PASS Board 2016: Update #2

PASS
Time flies. I didn't notice that I hadn't posted an update in February. There’s been a lot going on since I last posted! I've attended the executive committee meetings. I've also hosted my first board meetings and I took part in my first Town Hall. I've been working with PASS HQ to set the agenda for upcoming meetings and we're starting the budgeting process for FY2017. I've got a couple of blog posts I've put together on the Board Elections (for my blog) and on the goals and plans for the EVP (on the PASS blog) that are going through an editing process. I should be able to share those with you soon. Today, I'm going to discuss a couple of things that I've been mulling over. They're things that…
Read More

Cross Database Query in Azure SQL Database

Azure
You can't query across databases in Azure SQL Database... or can you? Let's check. I've created two new databases on an existing server: I've created two tables on each respective database: CREATE TABLE dbo.DB1Table ( ID INT IDENTITY(1, 1) NOT NULL PRIMARY KEY, Val VARCHAR(50) ); CREATE TABLE dbo.DB2Table ( ID INT IDENTITY(1, 1) NOT NULL PRIMARY KEY, Val VARCHAR(50) ); Now, let's query the DB2 table from the DB1 database: SELECT * FROM DB2.dbo.DB2Table AS dt; And here's the lovely error message: Msg 40515, Level 15, State 1, Line 35 Reference to database and/or server name in 'DB2.dbo.DB2Table' is not supported in this version of SQL Server. So, like I said, you can't do three part name cross-database queries in Azure SQL Database... oh wait, that's not quite what I said…
Read More

Opportunities To Talk

Misc, PASS
It's weird being an introvert who likes to talk to people, but what can I do. I like talking to people. I have a number of upcoming trips, quite literally all over the world, that provide us with the opportunities to get together and have a chat. First, I'll be at SQL Saturday Boston (the 500th SQL Saturday event, HUZZAH!), this weekend, March 19th 2016. I'll be talking about the Query Store and I'll be doing a presentation for PASS since this is a milestone event. The first SQL Saturday event in Boston was #34, six years ago, which I helped organize. It's been quite the journey. I'm going to SQL Saturday Madison on April 9th. I'll be talking about the Query Store and how to automate your database deployments.…
Read More

Leadership Lessons

Professional Development
Not for you, for me. I'm sure you've heard the statement: Praise in public. Criticize in private. I agree with this approach. However, I find it extremely difficult to do. It's one of the fundamental proofs that all leadership, all life for that matter, is about constant practice and discipline. It's not enough to know something. It's not enough to practice something occasionally. To get good at this stuff, you need to practice a lot. Let me tell you about a recent failure on my part. My 17 year old daughter had friends for a sleepover (yeah, they still do that). She makes her own breakfast and starts eating. I remind her to ask her friends what they want. She does so in this really irritated manner. Of course, the…
Read More

SQL Server Backups Are A Business Decision

SQL Server, SQL Server 2016
Blog post #3 in support of Tim Ford’s (b|t) #iwanttohelp, #entrylevel Read more about Tim's challenge here. It's very easy to think of SQL Server backups as a technical problem. You have so much stuff going on, BACKUP DATABASE commands, recovery models, BACKUP LOG commands, Differential backups. Getting them all into the correct order and automating the processes sure seems like a technical problem. It isn't. It's all about the business. If you're taking on the duties of a DBA whether you're an accidental DBA, a reluctant DBA or you were voluntold into the DBA position, you need to plan to sit down with responsible parties from the business and get an understanding with them regarding RPO and RTO. RPO is a TLA for Recovery Point Objective. The easiest way to…
Read More

Speaker of the Month: March 2016

Professional Development
I'm finally getting back out to community events so I should be able to avoid giving this gigantic honor to professional speakers for a month or two. My Speaker of the Month for February 2016 is Ron Dameron (b|t) I saw Ron’s presentation Monitoring & Alerting for Azure SQL Database at SQL Saturday Tampa. It was a good presentation (or it wouldn’t be here would it). I especially like the topic. As more people move on to the Azure platform, this is the sort of information they’ll need. Ron spent a lot of time setting up slides to avoid overusing bullets. Nicely done. His delivery was clear and solid. He used Zoomit quickly and smoothly, it looked like it was just part of the presentation. His demos worked (unlike a couple…
Read More

Wait Statistics in Azure SQL Database

Azure, T-SQL
You need to be aware that you're going to see differences when you're working with Azure SQL Database when it comes to wait statistics. If you're running a v12 Azure SQL Database (and if you're not, go fix it), you can run a query against sys.dm_os_wait_stats. Here's the output for the TOP 10 waits ordered by wait time on one of my databases: Everything you're used to seeing, right? Well... not quite. This is Azure SQL Database. So, let's use sys.dm_db_wait_stats, a DMO that is only available within Azure. This lists waits by database. The TOP 10 here are: You'll notice that these results are wildly different from those above. What we're looking is largely a server versus a database, but not completely. I mean that sys.dm_os_wait_stats is showing the waits for the…
Read More

Query Store and Recompile

Azure, SQL Server 2016, T-SQL
One of the many advantages of SQL Cruise is the ability to have enough time during a presentation to be able to answer questions from the people there in great detail. One question came up while I was showing the new functionality of Query Store (available soon in SQL Server 2016, available right now in Azure SQL Database). What happens to plan forcing when you have OPTION RECOMPILE on a query? Great question. I have a favorite procedure I use to illustrate the functionality of parameter sniffing: ALTER PROC dbo.AddressByCity @City NVARCHAR(30) AS SELECT a.AddressID, a.AddressLine1, a.AddressLine2, a.City, sp.Name AS StateProvinceName, a.PostalCode FROM Person.Address AS a JOIN Person.StateProvince AS sp ON a.StateProvinceID = sp.StateProvinceID WHERE a.City = @City; If this procedure is called with the value of 'Mentor' you get…
Read More

Why Is The Server Slow?

SQL Server, SQL Server 2016, T-SQL
This is blog post #2 in support of Tim Ford's (b|t) #iwanttohelp, #entrylevel. If you haven't been working in SQL Server for very long, you may not have got this phone call yet, but you will: Hi, yeah, the server is slow. Thanks. Bye. Let's pretend for a moment that you know which server they're referring to (because just finding out that piece of information can be a challenge). Now what? The list of tools and mechanisms within SQL Server for gathering metrics is extremely long: Performance Monitor Dynamic Management Views & Functions System Views Extended Events Trace Events Activity Monitor Data Collector Execution Plans 3rd Party Tools I'm leaving out lots of stuff in that list. So where do you start when you get this phone call? Where is the server slow?…
Read More

Azure SQL Database Error

Azure
I was on SQL Cruise where I was scheduled to present a session on Azure SQL Database. I recorded all my demonstrations before we went to sea, but, I planned to attempt to try live demo's. Yeah, yeah. Well, anyway, I got a unique error when I attempted to connect: Forced connection closes from remote host That's a partial message from the whole error. I don't have a good screen capture. I wasn't able to find anything on it through Ging searches, but this week I was at Microsoft for a training course on Azure. I asked the room. The rough answer is (paraphrasing): The IP address I was attempting to connect from is not is not on the approved list Interesting. I didn't realize there were blackout zones. The really…
Read More