HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Are there any reasons not enable SQLCMD-mode as default in SSMS?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
enablessmsareanymodedefaultsqlcmdreasonstherenot

Problem

I don't consider "just to ensure that sqlcmd-mode is not required by a script" a valid reason.

Any things to think of before giving the order to enable this setting to my coworkers?

Solution

Yes, I don't want to work in SQLCMD mode all the time

It suits you but not me

Irritating:


Enabling SQLCMD mode turns off IntelliSense and the Transact-SQL debugger in the Database Engine Query Editor.

Dangerous?


When executed from the command line, the sqlcmd utility permits full interaction with the operating system. When you use the Query Editor in SQLCMD Mode, you must be careful not to execute interactive statements. The Query Editor cannot respond to operating system prompts.

And some limitations of course...


So no flow control or TSQL variable assignments with SQLCMD mode? This is a big disappointment. Not very many SQLCMD keywords are supported and no real flow control commands

Context

StackExchange Database Administrators Q#7411, answer score: 9

Revisions (0)

No revisions yet.