SQL SERVER – 2005 – Open SSMS From Command Prompt – sqlwb.exe Example

This article is written by request and suggestion of Sr. Web Developer at my organization. Due to nature of this article most of the content are referred from Book On-Line. sqlwb command prompt utility which opens SQL Server Management Studio. sqlwb command does not run queries from command prompt. sqlcmd utility runs queries from command prompt, read for more information.

The syntax of this sqlwb is very simple. I will copy complete syntax from BOL here :
sqlwb
[scriptfile] [projectfile] [solutionfile] [-S servername] [-d databasename] [-U username] [-P password] [-E] [-nosplash] [-?]

I use following script very frequently.

Solarwinds

1) Open SQL Server Management Studio.
sqlwb

2) Open SQL Server Management Studio with windows authentication with no splash screen and default database as AdventureWorks
sqlwb -E -S SQLServerName -D AdventureWorksnosplash

3) Open SQL Server Management Studio with username and password with no splash screen and default database as AdventureWorks
sqlwb -S SQLServerName -U MyUserName -P MyPassWord -D AdventureWorksnosplash

To execute above commands you should have access to sqlwb.exe file. My local computer has sqlwb file in folder : C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE
Click on Start >> click on run >> type in following command to launch SQL Server Management Studio :
“C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\sqlwb.exe” -E -S SQL -nosplash

Reference : Pinal Dave (https://blog.sqlauthority.com)

Solarwinds
, , ,
Previous Post
SQL SERVER – 2005 – Different Types of Cache Objects
Next Post
SQL SERVER – Executing Remote Stored Procedure – Calling Stored Procedure on Linked Server

Related Posts

29 Comments. Leave new

  • Kulbhushan Pawar
    July 1, 2012 9:44 pm

    its not opening, saying cannot find sqlwb.exe.

    Reply
  • ssmsee is to open SQL Server 2005

    Reply
  • Ohh.. Dave…you are great!..thanx ..You helped me in jus 5 letters!

    Reply
  • if the password contains space it doesn’t recognized it. Quotation mark doesn’t work either

    Reply
  • This i have done . With Script file .. Opened the SQLWB.exe with credentials and Script file. Everything works fine .
    Instead of pressing F5 or Execute button . How can i pass the execute option through command prompt itself? I tried a lot still finger crossed for your replies now.

    Reply

Leave a Reply

Menu