September 2006 Blog Posts
In SQL Server 2000, you could generate a SQL script easily using the Generate SQL Script wizard. You could get to it from pretty much anywhere from within Enterprise Manager. For instance, you can get to it by right clicking on any object in the database, then selecting All Tasks, and then selecting Generate SQL Script.
In SQL Server 2005, it is now called Generate Scripts. The only place that I can find where you can get to it is if you right click on the database, then selecting Tasks, and then selecting Generate Scripts. The 2005 wizard does not...
By default, xp_cmdshell is disabled in SQL Server 2005 for security reasons. I am currently using xp_cmdshell in my backup stored procedure to delete files, so I must enable xp_cmdshell on my SQL Server 2005 instances. There are two ways to enable this option: Surface Area Configuration tool or sp_configure. Enabling this option via Surface Area Configuration tool is rather straight forward. Here is the script to enable xp_cmdshell in SQL Server 2005 via sp_configure:
EXEC master.dbo.sp_configure 'show advanced options', 1
EXEC master.dbo.sp_configure 'xp_cmdshell', 1
In Query Analyzer, we could easily comment blocks of code using Ctrl+Shift+C and uncomment blocks of code using Ctrl+Shift+R.
These keyboard shortcuts do not work in Management Studio unless you switch the keyboard scheme to SQL Server 2000.
In Management Studio, you can comment blocks of code using Ctrl+K, Ctrl+C and uncomment blocks of code using Ctrl+K, Ctrl+U. These are the same keyboard shortcuts that you would use to comment blocks of code in Visual Studio .NET, so I'm sure that's why Microsoft decided to switch the shortcuts.
To see other keyboard shortcuts for T-SQL code in Management Studio, open a query window...