DataWriter

February 11, 2011

A Handy Management Studio Trick

Filed under: Scripting,SQLServerPedia Syndication — Joe Casella @ 8:22 pm
Tags:

When I’m doing a lot of development and processing I like to open a new instance of SSMS for each server I’m working on so I don’t accidentally execute the wrong code against the wrong server.

I’ve found I can make those connections very quickly by creating a little .cmd file for each server connection and adding the –nosplash and –S command-line parameters.

  1. start ssms.exe -nosplash -S "Storm" %1

The –S argument opens SSMS with a connection to my server (Storm) and the –nosplash parameter suppresses the splash screen.  Adding the dos %1 parameter allows me to drag-and-drop a script and open it in a new instance of SSMS with a server connection.

You can also use these parameters to modify a shortcut.  Check out Books Online for more details.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: