Home > Management Studio, SQL Bugs, SQLServer, SQLServer 2012 > “Denali” – Issue with command-line options – SQL Bug

“Denali” – Issue with command-line options – SQL Bug

Earlier, I posted about how to connect to a SQL Instance automatically when you launch Management Studio using command-line options.

Management Studio Startup Parameters – Tips & Tricks

This seems to work fine with Management Studio 2005 / 2008.
However, The new version “Denali” seems to have some issue with it.

First of all, the syntax is changed a little bit for “Denali”:

Instead of using:

SSMS -S SERVERNAME\INSTANCENAME -E

you need to add a full colon “:” between the switch and values:

SSMS -S:SERVERNAME\INSTANCENAME -E

This will work fine with “Denali” if you launch SSMS.exe from command-line.

But, if you update the shortcut target for Management Studio as below, you will run into error.

image

Once, you change the Target, and then launch the SSMS from shortcut, you won’t be connected to “VISHAL\DENALI” instance. Instead, you will get the “Connect to Server” dialogue box:

image

Now, another issue here is, even if you manually click on “Connect” or “Cancel” on “Connect to Server” dialogue box. Management Studio will not launch. Instead, you will get another error message and Management Studio will close!

image

Workaround:

Do not use command-line options in shortcut target. If you need to use command-line options launch the Management studio from command prompt.

How to launch Management Studio from command prompt:

1. Go to Start > Run > cmd.exe

2. Type below command (With Quotes) and press Enter (Replace “VISHAL\DENALI” with correct instance name):
cd\”Program Files\Microsoft SQL Server\110\Tools\Binn\ManagementStudio”
SSMS.exe -S:VISHAL\DENALI –E

3. If you want to use SQL Authentication : use below command (With Quotes) and press Enter (Replace “VISHAL\DENALI” with correct instance name):
cd\”Program Files\Microsoft SQL Server\110\Tools\Binn\ManagementStudio”
SSMS.exe -S:VISHAL\DENALI -U:sa -P:MyStrongPassword

Hopefully this will be fixed soon, I have submitted this bug to Microsoft, you can check it on below link:

Command Line Options Not working for SSMS | Microsoft Connect

Hope This Helps!

Vishal

If you like this post, do like my Facebook Page -> SqlAndMe
EMail me your questions -> Vishal@SqlAndMe.com
Follow me on Twitter -> @SqlAndMe

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: