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.
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 AdventureWorks – nosplash
3) Open SQL Server Management Studio with username and password with no splash screen and default database as AdventureWorks
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\IDEsqlwb -S SQLServerName -U MyUserName -P MyPassWord -D AdventureWorks – nosplash
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
No comments:
Post a Comment