Thursday, July 2, 2009

Adding folders to SSMS project

Problem:

Can't create folders in a SQL Server 2005 Management Studio project.

It would be handy to be able to separate scripts into folders. Unfortunately only three default folders are available: Connections, Queries and Miscellaneous

Workaround:

  1. Open the .ssmssqlproj file in a text editor
  2. Copy one of the LogicalFolder tags e.g. Miscellaneous
  3. Replace the Folder Name and Type. Make sure the Type value is different from all of the existing folders
  4. Your new folder(s) should now be available in SSMS
Example insertion:

<LogicalFolder Name="Stored Procedures" Type="4" Sorted="true">
<Items />
</LogicalFolder>




3 comments:

Anonymous said...

I developed SSMS add-in which enables you to organize SQL objects not in SSMS project but directly in Object Explorer, it is helpful for me. Check it here http://www.sqltreeo.com.

Airn5475 said...

This isn't quite working for me. I am able to create the new folders, but when I add files to them they just have the Folder Icon and throw an error when I double click on them: Value does not fall within the expected range.

Thoughts?

oscil8er said...

Sorry, never experienced that problem...