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.

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)

SQL Scripts, SQL Server Management Studio, SQL Shortcut, SQL Utility
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

  • Great, but only one thing is bad, Object Explorer are not connected to server, so if you open SSMS in this way, and you need Object Explorer you have to connect it manually :-(

    Reply
  • Good one.

    Reply
  • yogitha bali g.s
    October 9, 2009 10:16 pm

    pls explain the sql service with example

    Reply
  • yogitha bali g.s
    October 9, 2009 10:25 pm

    how to use the sql service

    Reply
  • Hi,
    When i tried to open sqlwb.exe/Management Studio, its just return me the popup or you can say main page of Management Studio 2005 and then gone.
    Means sqlwb.exe unable to execute properly. Does Something is hanging/blocking in between ?
    So when we execute any .exe file, Does it requires any extra space in temporary folder ?

    Reply
  • @yogitha,

    A SQL Service is a service dedicated to running the SQL Server instance within a System.

    The service is part of the Windows Service mechanism. You can start and stop them,(Either Automatically,manually or delayed start).

    For example: The SQL Server default instance service, is named MSSQLServer(InstanceName) and ServiceName SQLServer(MSSQLServer).

    This particular service is meant for the DB Engine. There are other 3 optional services if installed,

    Analysis Services
    Reporting Services and
    Service Broker

    And of course, the most important of all, is the SQLBrowser service, without which, your SQL Server cannot be found on the network.

    Thanks

    Reply
  • Dear All

    whenver i am tried to open ssms (sql server managemnt studio) i got the massge window can not find “sqlwb.exe”
    please give me some solution

    Reply
  • Hello Zahid,

    Confirm the following:
    1. You are trying to connect to SQL Server 2005 SSMS.
    2. the file sqlwb.exe exists at path: %programfiles%microsoft sql server90toolsbinnvsshellcommon7ide
    3. The above path is stored in the Environment Variable “Path”.

    Regards,
    Pinal Dave

    Reply
    • Hi Pinal Dave,

      There is a ssmsee.exe file in the path where you mentioned (%programfiles%\microsoft sql server\90\tools\binn\vsshell\common7\ide) and I typed ssmsee in the Run command . SSMS is opened..

      Reply
  • Hello Pinal,

    i got an error when i m trying to open sql server managment studio express edition…the error says sqlwb- ssms has encountred a problem and needs to close.

    please help me..waiting for ur quick reply.Thanks

    Reply
  • Hello Pinal,

    My bat file works fine but the ‘Object explorer’ remains empty. Why is this not automatically filled with a list of all the databases on the machine?
    The pulldown box in the toolbar does correctly know the databases as located on the machine.

    Could you please help me out here?

    Reply
  • Hi, I need to install the Management studio for clients who dont have SQL server installed, I tried with EXpress its working fine, but they need to do import and export of data thats not possible with express.
    is there any other way to install the managment studio other then express edition, I have msdn and other licensed versions, but I dont want to install sql server for them.

    Please advice.

    Reply
  • sqlwb enough to open sql server

    Reply
  • Hi.. this is naveen, when i click on the Sql Server Management Studio, I unable to open the Sql Server and i Got the error message that, Windows is searchin for SqlWb.exe file to locate the file urself, click browse…. but how to solve this and i have to open it for my project.. plz help me

    Reply
  • what i want is
    how to work with sql server 2005 in dos prompt
    exactly i want to run the command form dos prompt

    Reply
  • Hi Pinal,

    Can i use SSMS tool for measuring the scalability?

    If yes how do i use it?

    Thanks!

    Reply
  • Ashwani Mishra
    July 4, 2011 9:40 pm

    I want to open visual studio 2005 from run command.
    How will i open this>
    please tell me

    Reply
  • hi
    i have one problem with sqlserver 2008
    whn os is not working how can i take back up from sqlserver is it possible
    i am waiting for ur reply

    Reply
  • Perfect, thanks. Do you use all MS products? My company used Microsoft applications until about 2002 and then moven to Linux. It took a few months to (2 years!) to settle and function to everyone’s needs but now it’s rock solid. Saved loads on licensing! Thanks, Way.

    Reply
  • ssmsee in comand prompt..

    Reply
  • Hi,
    To run visual studio 2005/2008/2010 from run command, just type devenv in the run command.It will invoke the visual studio.

    Reply

Leave a Reply

Menu
Exit mobile version