SQLCMD mode in SQL Server Management Studio

August 21, 2009 | In Development |

In Microsoft SQL Server 2005, Microsoft introduced the command line tool sqlcmd to replace osql.

The SQL Server Management Studio allows you to run your scripts in ’sqlcmd mode’ in the query window.  This allows you to take advantage of the syntax colour coding and variables, while developing and testing sqlcmd scripts.  By default it is turned off, but you can enable it from the ‘Query’ menu for a specific query window.

One important thing to remember about using sqlcmd, is that it uses OLEDB, while Management Studio users the .NET SqlClient.  It is possible, therefore, to obtain different results when the scripts are actually run with sqlcmd at the command line.

No Comments yet

TrackBack URI

Sorry, the comment form is closed at this time.

Login | XFN| WP
Powered by WordPress with cmb-web Theme design by Christian Bridge-Harrington.
Blog feed. Valid XHTML and CSS. ^Top^