Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
I disagree with forcing your opinion of how to work onto colleagues. – gbn Oct 31 '11 at 12:21
up vote 5 down vote accepted

Yes, I don't want to work in SQLCMD mode all the time
It suits you but not me


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


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

share|improve this answer

It's good, and I'd say you can safely recommend it to people.

I would only be wary about the way that people start using it as an alternative to Dynamic SQL. I see people use SQLCmd variables $(somevar) instead of using SQL variables @somevar, which can hurt queries somewhat. But on the whole, there are plenty of good things about SQLCmd mode, and if you're pointing out the odd drawback like this, then I'd suggest you should be fine recommending it.

"Order" might be a bit strong though. ;)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.