Management Studio in SQLCMD mode

  • I'm thinking about one thing regarding using Management Studio in SQLCMD mode.

    Is there any way of enabling this from a script?

    It could be a command that enables SQLCMD mode or it could be a special file extension that opens Management Studio in SQLCMD mode.

    I know that it's easy to click on the icon for SQLCMD mode, but I would like be sure that anyone that is opening the script gets into the right mode automatically.

    Ola Hallengren

    http://ola.hallengren.com

  • well ... here's what I know - might get you going.

    Tools Menu / Options / Query Execution / "By Default, Open queries in SQLCMD mode" check box.

    this will auto turn it on for new queries.

    Now -- when you save this, it is saved to the SqlOptions file in your profile

    C:\Documents and Settings\ \Application Data\Microsoft\Microsoft SQL Server\90\Tools\Shell

    So, I suppose you could set the option, copy the file, turn off the option and you will have two options files to work with.

  • Thanks, Jamie. I understand.

    Now I was thinking more of publishing a SQLCMD file on a website and be sure that all people will open it in SQLCMD mode in Management Studio.

    Ola Hallengren

    http://ola.hallengren.com

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply