I have a habit of using keyboard shortcuts now and then. In the SQL Server Management Studio I have some favorites like CTRL-N to open a new query window, F7 to get the Object Explorer Details window or CTRL-SHIFT-M to get the popup to fill out the parameters in a generated template.
If you don’t know what I’m talking about you can try the following: in the Object Explorer, right-click the Stored Procedures node under the Programmability node of one of your databases and choose New Stored Procedure. This will open the Create Procedure template in a new query window. It looks like this:
-- ================================================ -- Template generated from Template Explorer using: -- Create Procedure (New Menu).SQL -- -- Use the Specify Values for Template Parameters -- command (Ctrl-Shift-M) to fill in the parameter -- values below. -- -- This block of comments will not be included in -- the definition of the procedure. -- ================================================ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: <Author,,Name> -- Create date: <Create Date,,> -- Description: <Description,,> -- ============================================= CREATE PROCEDURE <Procedure_Name, sysname, ProcedureName> -- Add the parameters for the stored procedure here <@Param1, sysname, @p1> <Datatype_For_Param1, , int> = <Default_Value_For_Param1, , 0>, <@Param2, sysname, @p2> <Datatype_For_Param2, , int> = <Default_Value_For_Param2, , 0> AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- Insert statements for procedure here SELECT <@Param1, sysname, @p1>, <@Param2, sysname, @p2> END GO
As you can see, it mentions the keyboard shortcut in the comments on top. Hitting CTRL-SHIFT-M opens the following popup:
In this popup you enter whatever values you’d like to fill in. When clicking OK, SSMS replaces the placeholders with the filled-in values.
So to cut to the chase, since I started using SSMS2008 I occasionally noticed that these keyboard shortcuts didn’t work anymore. At first I didn’t give it too much thought but when it started to really bug me I decided to check it out. And it appears to be a bug of some sort. There’s a really easy fix though.
Switching to the 2000 keyboard layout and switching back to 2008 will fix the problem. To switch keyboard layouts, go to Tools > Options. Under Environment > Keyboard you can select two different keyboard schemes.
A “Thank you” goes to Tibor Karaszi because it was on his blog that I found the solution.
Microsoft is aware of the issue as well, but there appears to be no info on what causes it.
Tags: data, SQL Server, SQL Server 2008
-
Man, thank you!!! this issue was bugging me since I moved to SQL 2008
-
Thanks a lot .Its so irritating when you cannot use shortcuts .
I am not sure if anyone addressed this change on 2008 but I guess it helps to show the server name on the tabs like in SQL Sever 2005For example in 2005 when you open multiple new query pages it would show the server information on the tabs like servername.databasename.query1.sql
But in 2008 the tabs open up as query1.sql-servername.databasename
If you have some 10 tabs open then at a glance its really hard to find out which query is running on which server so the 2005 naming was easy .
Is there any way that we can customize this option ?
-
Hahaha, nice one! Now it’s OK.






4 comments
Comments feed for this article
Trackback link: http://blog.hoegaerden.be/2009/01/25/ssms-2008-keyboard-shortcuts-not-working/trackback/