Deprecated: Assigning the return value of new by reference is deprecated in /home/protean/public_html/b/wp-includes/cache.php on line 33
Protean » SQL Server 2008

Archive for the 'SQL Server 2008' Category

Get the query and execution plan for a session

Sunday, December 5th, 2010


A simple piece of code to help you get the execution plan and the query text for a currently running query. This is especially useful when dynamic sql is being run against your database or if DBCC InputBuffer reports that a stored procedure is being run. You can actually view the execution plan for the batch that it’s running. It works using the 2005 management views and functions.

(more…)

Preparing an encrypted TDE enabled database for restore on a Standard Edition SQL Server

Friday, May 7th, 2010

I recently had the challenge of restoring an encrypted database on to a standard edition server to enable further development on the database code. It took some work, but to save you some time, I’ve listed the steps (and the T-SQL) in this article that you need to take in order to accomplish this.

(more…)