Friday 19 April 2013

Launch SQL Server Management Studio from Command Prompt

SQL Server 2005:
To launch SQL Server Management Studio 2005 from Command Prompt:
Click Start -> Run -> Type sqlwb.exe
or Start -> Run -> cmd -> Type sqlwb.exe

You can pass different parameters with the command. To see the list of parameters:
Click Start -> Run -> Type sqlwb.exe /? or sqlwb.exe -?
or Start -> Run -> cmd -> Type sqlwb.exe /? or sqlwb.exe -?

Usage:
sqlwb.exe [-S server_name[\instance_name]] [-d database] [-U user] [-P password] [-E] [file_name[, file_name]] [/?]

[-S The name of the SQL Server instance to which to connect]
[-d The name of the SQL Server database to which to connect]
[-E] Use Windows Authentication to login to SQL Server
[-U The name of the SQL Server login with which to connect]
[-P The password associated with the login]
[file_name[, file_name]] names of files to load
[-nosplash] Supress splash screen
[/?] Displays this usage information


SQL Server 2008/2012:
To launch SQL Server Management Studio 2008 or SQL Server Management Studio 2012 from Command Prompt:
Click Start -> Run -> Type SSMS.exe
or Start -> Run -> cmd -> Type SSMS.exe

You can pass different parameters with the command. To see the list of parameters:
Click Start -> Run -> Type ssms.exe /? or ssms.exe -?
or Start -> Run -> cmd -> Type SSMS.exe /? or ssms.exe -?

Usage:
ssms.exe [-S server_name[\instance_name]] [-d database] [-U user] [-P password] [-E] [file_name[, file_name]] [/?]

[-S The name of the SQL Server instance to which to connect]
[-d The name of the SQL Server database to which to connect]
[-E] Use Windows Authentication to login to SQL Server
[-U The name of the SQL Server login with which to connect]
[-P The password associated with the login]
[file_name[, file_name]] names of files to load
[-nosplash] Supress splash screen
[/?] Displays this usage information

No comments:

Post a Comment