Wayne Sheffield

My blog about SQL Server

Browsing Posts in SQL

The Scenario: You just restored a production database on a development server. You’ve told the developers that it’s restored, and you start to relax in your chair. 30 milli-seconds later, your phone is ringing… the developers can’t connect to the database that you just restored. You check the server, and the login exists. You check […]

Hello? Mr. DBA? Have you got a moment? So there you are, enjoying one of the few quiet moments of your day, sleeping working hard at your desk, when you get interrupted by a user with some really bad performance on a server. You investigate by running sp_who or sp_who2 to see the current activity, […]

Late last year, my life got strange. Well, it’s always been strange, so let’s just say it became stranger than normal. I started working on a project with a few folks, and that scarce commodity known as time became even more scarce to me. Things that I’ve been trying to do (get more involved on […]

Next up on the SQL Server 2012 Performance testing circuit: Gap Detection. You know, where you find missing values from a table of sequential numbers. SQL Server 2012 introduces the LEAD function, which I’ve previously blogged about here. In that blog post, I covered how to do Gap Detection using the LEAD function. Now, it’s […]

This month, T-SQL Tuesday is being hosted by Nigel Sammy. Since the RTM of SQL Server 2012 just occurred, he wants to know: “What do you think is a useful feature of SQL Server 2012?” Well, if you’ve been following my blog, then this should not be much of a surprise to you. My #1 […]

SQL Server 2012 introduces several new date/time functions that allow you to build a date/time from the individual parts of a date/time value. As I was experimenting with them, I was thinking that this is pretty neat, and bound to be very useful. And then I started wondering how well it performed. Before I had […]

Table-Valued Functions. What a wonderful addition to SQL they make. They take parameters, do some work, and return a result set that can be used in queries. You can select directly against them, or utilize them with the APPLY operator. These are truly versatile additions to SQL -and since you can pass parameters to them, […]

Actually, I only submitted the winning entry; Denali CTP3 SQL Server 2012 is the real winner. After having a blog posted here recently about running totals performance in Denali CTP3 SQL Server 2012, I happened to run across this T-SQL Challenge for doing running totals. On a lark, I posted a Denali CTP3 SQL Server […]

This post is part of the series discussing the new Analytic functions in SQL Server “Denali”, CTP3. Analytic Functions in SQL Server “Denali” All of the new Analytic functions require the use of the OVER clause. To see what changes to the OVER clause that “Denali” brings, please view my article The OVER Clause enhancements in […]

This post is part of the series discussing the new Analytic functions in SQL Server “Denali”, CTP3. Analytic Functions in SQL Server “Denali” All of the new Analytic functions require the use of the OVER clause. To see what changes to the OVER clause that “Denali” brings, please view my article The OVER Clause enhancements in […]