-->
SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Working with the registry from within SQL Server

There is a lot of information within the Windows registry. Sometimes, it would sure be nice to work with the registry within your T-SQL scripts. As it turns out, there are a bunch of undocumented extended stored procedures that do just this. A listing of these procedures are:

Regular Instance-Aware
Read more

0 comments, 151 reads

Posted in A Discussion of SQL Server-Related Topics on 16 August 2017

SQL Server 2016 helps with Best Practices

In order for your SQL Server instance to run optimally, there are many SQL Server best practices that you need to follow. The SQL Health Check that you can have us perform on your instances looks at many of these. SQL Server 2016, which at the time of this writing… Read more

0 comments, 2,529 reads

Posted in A Discussion of SQL Server-Related Topics on 19 July 2017

Combating SQL Injection

Target. Home Depot. NASA. U.S. Army. Anthem. Wall Street Journal. MarketWired. Ashley Madison. What do they all have in common? They are all recent victims of cyber-attacks – several of these are confirmed to involve SQL Injection. Even though the exact method used to penetrate the other systems has not… Read more

0 comments, 389 reads

Posted in A Discussion of SQL Server-Related Topics on 21 June 2017

Weaning yourself off of SQL Profiler (Part 2)

In a prior post, I shared a script that will take a running trace and show you the XE events that it relates to, and what columns are available within those XE events. Specifically, this was for converting a deadlock trace into an XE session; however the process is… Read more

0 comments, 316 reads

Posted in A Discussion of SQL Server-Related Topics on 17 May 2017

Weaning yourself off of SQL Profiler (Part 1)

In this brave, new world of Extended Events (XE, XEvents), I find myself with a mixture of scripts for troubleshooting issues – some use XE, and some use traces. We’ve all been told that XE is a much better system (it is much more lightweight, causing less of an issue… Read more

2 comments, 2,935 reads

Posted in A Discussion of SQL Server-Related Topics on 19 April 2017

Automating DBCC DBTABLE – obtaining the disk Sector Size

I was recently reading this msdn article on Ghost Records, and it mentioned that you could get the number of ghost records on a page with DBCC DBTABLE… and it also mentioned that you need to be sure that you enable Trace Flag 3604 in order to see the results.… Read more

0 comments, 4,516 reads

Posted in A Discussion of SQL Server-Related Topics on 22 March 2017

Working with SQLSaturday SpeedPASSes

SQLSaturday SpeedPASSes

I’ve been working with running SQLSaturdays in the Richmond, VA area for several years now. It seems that every year, I end up blogging something new. Frequently, this ends up being a script of some kind to help me out. This post follows this theme by introducing a… Read more

0 comments, 238 reads

Posted in A Discussion of SQL Server-Related Topics on 9 March 2017

Identifying a row’s physical location

While you may not need to worry about the physical location of a row very often, every so often the need comes up. In a few of my earlier posts (here), I have needed this information to prove a point. This post shows how to identify a row’s… Read more

0 comments, 239 reads

Posted in A Discussion of SQL Server-Related Topics on 8 March 2017

Automating DBCC PAGE – Part 3 (Is a Clustered Index physically sorted on disk?)

In several of my last few blog posts, I’ve shared several methods of getting internal information from a database by using the DBCC PAGE command and utilizing the “WITH TABLERESULTS” option to be allowed to automate this process for further processing. This post will also do this, but in… Read more

0 comments, 215 reads

Posted in A Discussion of SQL Server-Related Topics on 22 February 2017

T-SQL Tuesday #87 – Beware the Shiny New Toys

Today is yet another T-SQL Tuesday – the monthly blogging party started by Adam Machanic (b|t) to get everyone in the SQL Server blogosphere together and to blog about a topic. Today’s party is hosted by none other than Matt Gordon (b|t),… Read more

0 comments, 250 reads

Posted in A Discussion of SQL Server-Related Topics on 14 February 2017

Automating DBCC PAGE, part 2 – determining object names on pages

In a prior blog post, I demonstrated how using DBCC PAGE can be automated by using the “WITH TABLERESULTS” option. In this post, we will continue with another look at how this can be done.

On a nice wintry day, your city ended up being covered in several feet… Read more

0 comments, 204 reads

Posted in A Discussion of SQL Server-Related Topics on 18 January 2017

T-SQL Tuesday #86: Enhancement Requests

On the second Tuesday of each month, the SQL Server universe all comes together to blog about a topic. Known as T-SQL Tuesday and started by Adam Machanic (Blog | @AdamMachanic), this month’s T-SQL Tuesday topic is hosted by friend and fellow MCM Brent Ozar. The theme… Read more

0 comments, 219 reads

Posted in A Discussion of SQL Server-Related Topics on 10 January 2017

Windows Virtual Accounts and SQL Server

How SQL Server uses Windows Virtual Accounts and local groups

Managed Service Accounts (MSAs) and Virtual Accounts were introduced in Windows 7 / Windows 2008R2 (link). Installations of SQL Server 2012 and newer will utilize the Virtual Accounts. SQL Server 2008 / 2008R2 installations use a combination of… Read more

1 comments, 386 reads

Posted in A Discussion of SQL Server-Related Topics on 28 December 2016

Automating DBCC Page

Way back in 2006, Paul Randal documented DBCC PAGE on his Microsoft blog at http://blogs.msdn.com/b/sqlserverstorageengine/archive/2006/06/10/625659.aspx. In his post, you will notice that in order to return the output from DBCC PAGE to the screen, you need to enable trace flag 3604 first. The above blog post shows a few… Read more

1 comments, 215 reads

Posted in A Discussion of SQL Server-Related Topics on 21 December 2016

T-SQL Tuesday #85: Backup and Recovery

It’s that time of the month… the time when all of the T-SQL bloggers have a party and blog about a specific topic. Unfortunately, it’s been a few months since I’ve written a T-SQL Tuesday post. I’m hopeful that I can use this post to get back in the groove… Read more

0 comments, 213 reads

Posted in A Discussion of SQL Server-Related Topics on 13 December 2016

Persisting DBCC output data

Most of the DBCC commands return their results as textual output, even if you have SSMS configured to return result sets to a grid. This makes examining the output a manual process that is prone to errors. It sure would be nice if there was a way to return the… Read more

1 comments, 212 reads

Posted in A Discussion of SQL Server-Related Topics on 16 November 2016

The SQL Saturday Crazy Train hooks up a caboose!

You know, these 1 hour sessions that are at most SQL Saturdays are just too short sometimes – you just get going and bang! The times up. There’s only so much material that can be presented in just one hour. And if there are a lot of questions, you may… Read more

0 comments, 500 reads

Posted in A Discussion of SQL Server-Related Topics on 20 July 2015

How do different types of functions compare performance wise?

A while back, I wrote a blog post showing the differences (including performance) between Inline Table-Valued Functions (ITVF) and Multi-Statement Table-Valued Functions (MSTVF). Since then, whenever I speak about ITVFs / MSTVFs, I’m frequently asked about how Scalar Functions (SF) perform. My stock answer has always been that they perform… Read more

1 comments, 582 reads

Posted in A Discussion of SQL Server-Related Topics on 16 July 2015

The Murder Train is pulling into Iowa City

You know, these 1 hour sessions that are at most SQL Saturdays are just too short sometimes – you just get going and bang! The times up. There’s only so much material that can be presented in just one hour. And if there are a lot of questions, you may… Read more

0 comments, 414 reads

Posted in A Discussion of SQL Server-Related Topics on 11 May 2015

T-SQL Tuesday #61 – The Wrap-Up

Earlier this month, I hosted the 61st occurrence of the monthly TSQL-Tuesday blogging party. With a topic of “Giving Back”, it had a great turnout (27 party-goers). As I read through all of their posts, I noticed that many are planning to give back in pretty predictable ways… Read more

2 comments, 1,032 reads

Posted in A Discussion of SQL Server-Related Topics on 31 December 2014

Older posts