I was reading a series of articles by Olga Klimova on SQL Server Central dealing with creating custom stored procedures to use as the shortcuts for developers. This got me thinking, the SSMS shortcut keys are something I haven’t really taken advantage of, and there are a number of great built in procedures that I wouldn’t mind having at my fingertips. So I made a conscious decision to start to using this 12 short cut keys with stock stored procedures. For those of you who are unfamiliar with the shortcut keys in SSMS they are 12 in total Alt-F1, Ctrl-F1, and Ctrl-1 thru Ctrl-0, accessible from the menu under Tools->Options->Environment->Keyboard. Out of the box SSMS has 3 of those choices reserved. Alt-F1 is sp_help, Ctrl-1 is sp_who, and Ctrl-2 is sp_lock.
While I wish you could completely customized this list, you are stuck with the 3 default choices for better or worse. I can’t say I really have used sp_help a whole lot but now that I am used to using the shortcut keys it can give you a great overview of a database or a table really quickly. sp_who is OK, but who doesn’t want to use sp_whoIsActive. sp_lock, its quick and its there so I do use it instead of DMV’s sometimes, it is going away at some point so we will see.
Well here is my list of the other 9 stored procedures:
Ctrl-F1 – sp_helptext – Great procedure to find out the text of stored procedures or other objects, and kind of sets a theme for the first few procedures, grouping all of my help based procedures. Useful for anyone, Developer, DBA, Report writer whatever.
Ctrl-3 – sp_helpIndex – Gives some basic information about a tables indexes. I wish it would showed included columns but it doesn’t. Overall useful for the developer or the DBA.
Ctrl-4 – sp_helpdb – Gives basic information about all DB or more specific information on a particular db, overall useful for the DBA.
Ctrl-5 – sp_whoIsActive – First off I know its not a Microsoft stored procedure, it should be. Super useful procedure, nuff said its in.
Ctrl-6 – msdb.dbo.sp_help_job – Not in the Master DB and needs a three part name to execute properly but very useful. (Not in my help grouping but in my job grouping) Between this procedure, sp_helpIndex, and sp_help I find myself using the Object Explorer view less and less. useful for both the DBA and the Developer depending on the environment.
Ctrl-7 – msdb.dbo.sp_start_job – Starts a job, useful all around.
Ctrl-8 – xp_fixeddrives - Very useful undocumented stored procedure. I’ve mentioned it before in previous posts. This is more for a Developer than a DBA.
Ctrl-9 – sp_spaceused – This is something I use on a daily basis. Sometimes you just need to know how much space a table takes up. Great for Developers and DBAs.
Ctrl-0 – sp_monitor – I actually really never used this, I was searching for something to fill out my shortcut keys list. Its interesting, check it out, thats all I can say.
Once assigned you have to open a new query window to use this shortcuts or just open and close SSMS.
Post me back if you have a better list or something that should be switched out.