Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way when opening SQL Server Management Studio to also open databases along with it. For instance, I usually work on a minimum of 6 databases during an usual day, and if I could get the SQL Server Management Studio to automatically open those database, so the only thing I need do is select which one I'm going to use, that would be great.

Does anyone have an idea on how to do this?

share|improve this question
add comment

1 Answer

There are some command line arguments you can use to start SQL Server Management Studio and connect to a specific database directly, as pointed out on this blog post.

To see the command line options, type ssms /? at the command prompt.

enter image description here

So you could save one command line in a shortcut or batch file to quick connect to a database. To avoid storing password in plain text, logging with the -E option to use Windows Authentication is advisable.

Unfortunately each command line spawns a new instance, at least on SQL Server 2008 R2 I tested with. I have not found a way to open multiple connections on the same SQL Server Management Studio window.

Hopefully, it can still help you save some time.

share|improve this answer
    
Thank you that is just what I was looking for. –  Frank Jun 13 '13 at 12:49
    
@Frank You're welcome. Please mark as answered if you are ready to. –  mtone Jun 13 '13 at 17:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.