How do I get into command mode in SQL Server 2014? RRS feed

  • Question

  • In the only reference I can find for Command Mode, I am instructed to use the icon on query toolbar, but I can not identify it. Is there a menu alternative? can I invoke it through code?

    Sandy Shin

    Tuesday, January 6, 2015 6:56 PM


  • Hello Sandy Shin,

    After searching for MSDN documents, according to this article below:


    It shows you could enable scripting mode by clicking the SQLCMD Mode icon in the toolbar or by selecting SQLCMD Mode from the Query menu.

    >>can I invoke it through code?

    If you mean that you want to enable this mode in code, since it is SQL Server database, there is an API which could be used to operate the database which might do it in code:

    Overview (SMO)

    I should mention I am not experienced with SQL Server management, and this forum is used to discussing and ask questions about .NET Framework Base Classes (BCL) such as Collections, I/O, Regigistry, Globalization, Reflection. I suggest that you could post SQL Server related issue to this forum for getting a professional support.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Fred Bao Friday, January 16, 2015 10:04 AM
    Wednesday, January 7, 2015 9:11 AM