A new feature in SQL Server 2012, is the ability to reset keyboard shortcuts in SQL Server Management Studio to match Visual Studio 2010. In this tip we will take a look at how easily you can change keyboard shortcuts in SQL Server Management Studio using the Import and Export Settings Wizard.
Database Developers and Administrators who are used to using SQL Server Management Studio know that to execute a Query within the TSQL Editor you can use the CTRL+E or F5 keyboard shortcut keys. However, users who use Visual Studio 2010 are used to the CRTL+SHIFT+E keyboard shortcut to execute a query using the Visual Studio IDE. The best thing is that both sets of users can now be happy as SQL Server Management Studio in SQL Server 2012 comes with 2 different types of keyboard shortcut settings as mentioned below.
- SQL Server 2008 R2 Compatible Settings: - This setting can be used by users who are already familiar with keyboard shortcuts that were available in SQL Server Management Studio for SQL Server 2008 R2. These settings are applied by default once you install SQL Server Management Studio for SQL Server 2012.
- Visual Studio Compatible Settings: - This setting can be used by users who want similar keyboard shortcuts in SQL Server Management Studio as are available in Visual Studio 2010.
Let's go through the steps to use the Import and Export Settings Wizard in SQL Server Management Studio for SQL Server 2012 to change the default keyboard shortcut settings to what is available in Visual Studio 2010.
1. In SQL Server Management Studio for SQL Server 2012 from the Tools menu select the Import and Export Settings... option from the drop down list as shown in the snippet below to open up the Import and Export Settings Wizard.
2. In the Welcome to the Import and Export Settings wizard screen you will be able to see three different options:
- Export selected environment settings: - use this option to save currently used setting to a file so that it can be imported any time to another machine.
- Import selected environment settings: - use this option to import settings from a file so that you can apply the same in the current environment.
- Reset all settings: - If you want to swap the keyboard shortcut keys to that of SQL Server 2008 R2 Compatible Settings or Visual Studio 2010 Compatible Settings then choose this option.
3. In the Import and Export Settings wizard screen once you select the Reset all settings option then click the Next button to continue with the wizard.
4. In the Save Current Settings wizard screen you will see an option to either Yes, save current settings or No, just reset settings, overwriting my current settings. If you have added any Query shortcuts then it is recommended to save your current settings to a file for future use. Click Next to continue with the wizard.
5. In the Choose a Default Collection of Settings wizard screen you will find options to configure environment settings to closely match SQL Server 2008 R2 or configure the environment settings to closely match Visual Studio 2010. Choose the approrpiate option and click Finish which makes the settings take effect immediately.
- Stay tuned for more tips on SQL Server 2012 and check out these related tips:
Last Update: 2012-02-27
About the author
View all my tips