Tag: EXEC

TempDB – Do This and Don’t Do That

Today I had the opportunity to present on TempDB to the Spokane SQL Server users group (PASS Chapter). The session was titled TempDB – Do This and Don’t Do That”, and it covers a bunch of tips and best practices around

Posted in Uncategorized Tagged with: , , , , ,

Temporary Stored Procedures #sproc

Yes, you can create temporary stored procedures by prefixing the name of the sproc with a #. The temporary stored procedure is sort of a “leave no trace” stored procedure that is only good for your session. If you use

Posted in TSQL Tagged with: , , , , , , ,

Visualizing VLF’s – Updated

A while back a wrote a blog post with a query to Visualize the VLF’s in your database. Today I have an update to that script. Here is an updated script that has adds another column called “TextStatus” to the

Posted in Uncategorized Tagged with: , , , , , , ,

Visualizing Log File VLF Sizing

One of my favorite queries this week is the following query that creates a text based bar chart to quickly help visualize the VLF files on any database log file. In the last month I have given the “TempDB Do

Posted in Performance Tagged with: , , , , , , ,

TempDB – Do This and Don’t Do That

Today I am presenting my “TempDB – Do This and Don’t Do That” session at SQL Saturday Redmond. Here is the download of the presentation and samples. StedmanTempDbPresentation.zip   Some of the sample code from the session:   I hope

Posted in SSIS Performance Tagged with: , , , , ,

SQL Server MAX DEGREE OF PARALLELISM

The check for MAX DEGREE OF PARALLELISM has be added to the Database Health MonitorQuick Scan Report. The max degree of parallelism setting in SQL Server is used to control the maximum number parallel threads available to process your

Posted in Database Health Tagged with: , , , , ,

SQL Server – Dedicated Admin Connection (remote DAC)

In SQL Server there is a special connection that can be used to connect to the database, the remote Dedicated Admin Connection or (DAC). This is a special connection that allows the administrator to connect to the SQL Server even

Posted in DBA Tagged with: , , , , , ,

DBCC CheckDB All Databases

If you use the SQL Server maintenance plans to run DBCC Check DB, you are not allowed to include TempDB in your DBCC CheckDB sequence. For a while I was using maintenance plans, and ending up adding a separate job

Posted in Uncategorized Tagged with: , , ,

Corruption Challenge 1 – An alternative solution

After posting the winning solution for Corruption Challenge 1 from Brent Ozar, I realized that he and I both solved the corruption by using the REPAIR_ALLOW_DATA_LOSS option on CheckDb. A very nasty move, however it did repair the corruption.  

Posted in Corruption Tagged with: , , , , ,