T-SQL to check the properties of all the databases on a server

Views – 594

How to shrink huge log files

Here is a short script to quickly shrink your log file if you DO NOT NEED to ever recover the database before the…

Some thoughts on auto-incrementing IDs

The implementation & syntax feels like an afterthought, like the engineers of SQL Server made something self-consistent, and then the market research wing…

Configure Email Alerts via T-SQL

You can run the following SQL script to ensure email alerts are configured for the LSCopy and LSRestore jobs:

Views – 490

Using the LIKE keyword more efficiently

from Pinal Dave’s article here: http://blog.sqlauthority.com/

The previous query does find FirstName values beginning with the letters ‘A’ thru ‘K’. However, when…

Adding SELECT Excel hyperlinks to recordsets

Users frequently want spreadsheets with embedded links to web pages, one per row. This is one way to get them.

Views –…

Getting the plan handle for a sproc

You can use this T-SQL to get the plan handle for a sproc that has a bad execution plan:

Make sure, to…

Viewing the execution plan for a specific Sproc

Views – 457