Dba’s Memory Assistant

I can’t always remember ok, make that i frequently forget things.   Can i use SSMS to help me?  Yes! I forget SQL things.  Some SQL things i know very well.  So whenever i start using something that is even slightly complex, i’ll put it someplace that i frequently go… SSMS new query window… By putting frequently used items (that are also hard to remember) in this file:

C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\SqlWorkbenchProjectItems\Sql

Items in that file show up in each new SQL query window i open up while working thru the day.  Below are some sample contents of such a file.  Notice the first line includes the location of the file…so i can find it easily again, when i want to change it.

/* Steve Schneider

C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\SqlWorkbenchProjectItems\Sql

select * from sys.sysprocesses where blocked <> 0

RAISERROR (‘starting join!’, 0, 1) WITH NOWAIT

exec sp_whoisactive @filter_type = ‘database’ , @filter = ‘k2,K2log’ –@help = 1

*/

 

Leave a Reply

Your email address will not be published. Required fields are marked *