Launching a default Project in SQL Server Management Studio


By:   |   Updated: 2008-10-20   |   Comments   |   Related: More > SQL Server Management Studio

Problem

I have a common set of scripts I rely on whenever I create a new SQL Server 2005 instance.  I understand that I can group these scripts and connections into a SQL Server Management Studio Project, but is there an easy method for opening this Project by default when I launch Management Studio?

Solution

The short answer to your question is "No".  However, there are some different methods that have the net effect of accomplishing what you wish to do: open this project by default, when you choose to.  The first involves a process we are most-likely all familiar with, not as users of Microsoft SQL Server, but rather Microsoft Windows.  It involves creating a Shortcut to your SSMS Project's .ssmssqlproj file:

The Shortcut Method

Locate the .ssmssqlproj file for your SSMS Project.  By default this file exists in the same file directory as the objects for the SSMS Solution that the Project is a member.

configuration

Right click the .ssmssqlproj file and select Create Shortcut.

organize

At this point, you can either leave the Shortcut in this folder, move it to a common folder for other Project Shortcuts, or perhaps to the Quick Launch area of the Windows Task Bar.  Now, when you launch this Shortcut, Microsoft SQL Server Management Studio will start up with this Project loaded and ready to use.

The "Shortcut, Who Needs a Stinking Shortcut" Method

If you choose to launch SQL Server Management Studio from the Run Command in Windows (shown here) or by way of a command prompt you can do so via simply typing the following:

run

Management Studio will open the project if you simply append the project file's full file path when you launch sqlwb:

management studio

Just as was the case with the Shortcut Method, your Project will launch when SSMS launches if you specified the valid file path.

solution explorer
Next Steps
  • To learn more about the organizational benefits that SSMS Projects provide check out this related tip:  Using Solutions and Projects to Manage Your SQL Server Code.
  • Create your own SSMS Project to group common tasks such as the creation of a SQL Server instance, Common Maintenance Queries, or perhaps Common Auditing Queries.


Last Updated: 2008-10-20


get scripts

next tip button



About the author
MSSQLTips author Tim Ford Tim Ford is a Senior Database Administrator with MindBody.

View all my tips
Related Resources





Comments For This Article





download


Recommended Reading

Display Line Numbers in a SQL Server Management Studio Query Window

SQL Server Management Studio Connection to Integration Services Error Class Not Registered

Connect to SQL Servers in another domain using Windows Authentication

Executing large scripts in SQL Server Management Studio with Insufficient Memory Failures

How to use RunAs command for SSMS if option does not exist





get free sql tips
agree to terms


Learn more about SQL Server tools