SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Query shortcuts in SQL Server Management Studio

Tired of typing out the same queries day after day? Well query shortcuts in SSMS are for you!

Following on from my last post Changing connection colours in SSMS I thought I’d write another quick about this cool but also often unused feature in SSMS.

These shortcuts allow you to run pre-determined queries by assigning a hot key within SSMS. To do this in SSMS go to Tools > Options > Environment > Keyboard

queryshortcuts2

From there you can set the query to the hot key you want to use. Nice and easy!

In nearly all of the instances of SQL Server that I look after, I’ve installed Adam Machanic’s excellent sp_whoisactive. By adding the above shortcut into SSMS I can run it quickly and easily in any instance that I’ve connected to. It’s really handy and I’d definitely recommend you install it and set a query shortcut up for it.

Thanks for reading!


The DBA Who Came In From The Cold

I’m Andrew Pruski and I am a SQL Server DBA with 5 years experience in database development and administration.

The online SQL Server community has helped me out immensely throughout my career, whether from providing reference material in blog posts, or answering my (sometimes obscure) questions on forums. So, to try and say thank you, I would like to contribute my own experiences in the hope that they could benefit someone out there.

So here’s my general ramblings and thoughts about working as a SQL Server DBA.

You can find me on twitter @DBAFromTheCold

If you have any feedback on my blog please send me an email to dbafromthecold@gmail.com.

Comments

Leave a comment on the original post [dbafromthecold.wordpress.com, opens in a new window]

Loading comments...