Category Archives: System Functions and Stored Procedures
-
Connect suggestion to add included columns to sp_helpindex
1January 10, 2017 by Kenneth Fisher
I’m a big fan of the sp_help system stored procedures, which is why I’ve been a bit disappointed that the …
Continue reading -
Master_Views: master_objects, master_tables, etc
1May 23, 2016 by Kenneth Fisher
There is a highly useful system view called sys.master_files. If you’ve never encountered it before it returns a list of …
Continue reading -
Running code on the startup of SQL Server
1February 1, 2016 by Kenneth Fisher
Every now and again you need to run code when your instance starts up. For example you might want to …
Continue reading -
Finding the worst running query in a stored procedure
14September 10, 2015 by Kenneth Fisher
The other day I was asked to tune a stored procedure. Not exactly an uncommon task, but I worked something …
Continue reading -
Pulling data from the error log
7August 17, 2015 by Kenneth Fisher
The other day I was asked to pull a list of errors from the SQL Server log into a table …
Continue reading -
Which user function do I use?
3June 24, 2015 by Kenneth Fisher
Earlier this week I was scripting out a table with some legacy columns (InsertDate and InsertBy for example). If you …
Continue reading -
Extending your metadata with Extended Properties
9May 18, 2015 by Kenneth Fisher
Ever wanted to put a comment on a table? Or maybe even a column? How about an expiration date on …
Continue reading -
Who’s using that database?
1March 9, 2015 by Kenneth Fisher
A common problem when trying to alter a database (take it offline, add a filegroup, whatever) is that someone else …
Continue reading -
Putting sp_ at the beginning of your stored procedure.
1November 24, 2014 by Kenneth Fisher
Every now and again you see articles and posts about putting sp_ at the beginning of a stored procedure. So …
Continue reading