Home Dashboard Directory Help

Command Line Options Not working for SSMS by Vishal Gajjar


 as Duplicate Help for as Duplicate

Sign in
to vote
Type: Bug
ID: 665415
Opened: 4/28/2011 3:28:01 AM
Access Restriction: Public
User(s) can reproduce this bug


Unable to Autoconnect to an instance using command-line options for SSMS.
Sign in to post a comment.
Posted by Dmitri Tushov on 10/18/2011 at 12:12 AM
Just installed CTP3 - cannot use command line at all even with workaround
Posted by Microsoft on 5/26/2011 at 11:00 PM
Hello Vishal,
Thank you for your feedback. This is a known issue being tracked internally. We're presently working on the fix.

Posted by AaronBertrand on 4/28/2011 at 5:02 AM
Yep, I posted a follow-up already.
Posted by Vishal Gajjar on 4/28/2011 at 4:59 AM
Hi Aaron,

colon is required for Denali, not for Older versions.

if you execute it at command prompt it will give you error.

C:\Program Files\Microsoft SQL Server\110\Tools\Binn\ManagementStudio>ssms -S VG

Microsoft SQL Server Management Studio 11.0.1103.9
Copyright (C) Microsoft Corp. All rights reserved.

Invalid command line.

ssms [-?] [-S:server_name[\instance_name]] [-d:database] [-U:user] [-P:password]
[-E] [-nosplash] [file_name[, file_name]*]

Available command line switches:
-S         The name of the SQL Server instance to connect to.
-d         The name of the SQL Server database to connect to.
-U         The name of the SQL Server login to connect with.
-P         The password associated with the login.
-E         Use Windows Authentication to login to SQL Server.
-noSplash Suppress splash screen.
-?         Displays this usage information.
Posted by AaronBertrand on 4/28/2011 at 4:46 AM
Sorry, I take it back, I do observe different behavior and the requirement of the colon when launching ssms directly from within its own folder.
Posted by AaronBertrand on 4/28/2011 at 4:44 AM
Vishal, this is not a bug. You're not using the syntax correctly. Try without the colon:

"C:\Program Files\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe" -S VISHAL\DENALI -E
Sign in to post a workaround.
Posted by Vishal Gajjar on 4/28/2011 at 3:41 AM
Vishal: Workaround is to launch SSMS from command-line:

Start cmd.exe

change current directory:
cd "Program Files\Microsoft SQL Server\110\Tools\Binn\ManagementStudio"

launch ssms.exe using:
File Name Submitted By Submitted On File Size  
3. Works fine from command-line.JPG 4/28/2011 15 KB
3. Error Message Displayed.JPG 4/28/2011 63 KB
1. Shortcut Properties.JPG 4/28/2011 25 KB