To launch SSMS using Command Line:
Go to Command Prompt and type:
SSMS -S SERVERNAME\INSTANCENAME -E
Give your server name & instance name to which you want to connect if any. by giving server name alone you will get connected to default instance of the server.
Examples:
All the options described above are for SQL Server 2008. The same options can be used with SQL Server 2005. However, for SQL Server 2005, replace SSMS.exe with SqlWb.exe.
Go to Command Prompt and type:
SSMS -S SERVERNAME\INSTANCENAME -E
Give your server name & instance name to which you want to connect if any. by giving server name alone you will get connected to default instance of the server.
Examples:
SSMS -S (local) –E
– connect to default instance using Windows Authentication
– connect to default instance using Windows Authentication
SSMS -S (local)\InstanceName –E
– connect to named instance using Windows Authentication
– connect to named instance using Windows Authentication
SSMS -S (local) -E -U sa -P P@$$w0rD
– connect to default instance using SQL Server Authentication– SQL Server Authentication takes precedence
– connect to default instance using SQL Server Authentication– SQL Server Authentication takes precedence
SSMS -S (local) -E C:\MyQuery.sql– connect to default instance using Windows Authentication– and open a saved query file
SSMS -S (local) -d AdventureWorks2008R2 -E– connect to default instance using Windows Authentication– and change context to AdventureWorks2008R2 database
No comments:
Post a Comment