Where I work, I have about 30 servers with over 28tb of data in over 800 databases, and am a solo DBA, yes, the team is me, myself and I. My normal day is working on once system for a few hours and then another. Then we have an emergency and everything is on hold. Once the emergency is done it is back to project work. How do you make this switch fast easy and not lose much time?
I am using SSMS solutions and project features to stay organized. This takes a little setup to help transition between tasks. And finding the correct files you are not well organized is hard.
You can use it as it is out of the box, you will not find the organized want. This is selecting the project right out of the new project dialog. My goals for this were to have organized files to allow switching projects as my work requires. And more importantly, in preparation for using GitHub. In Windows file manager it looks clean like this:
In SSMS it also looks clean 1. Your SQL code, 2 Additional files, and documentation, and 3. A description of the project’s goals.
Then this is how you set it up.
Step 1
First, create a base project. You can create more of these later, I like them all to be in one project.
On the SSMS file menu select NEW/project
On the dialog box resist the urge to select the first option in 1. Select the second to create a solution. 2. Name the project. 3. Unselect the create directory for the solution.
Step 2
Right Click on the solution you just created.
Next, select the New Project
This dialog will create the folder and structure to store your code. Name this with what you are going to create. I called my Agent Jobs Chart (a project I am working on).
In SSMS Solution Explorer you will not see a Project title and Connections, Queries, and Miscellaneous.
Here is how I use them. Connection – your development connection. Queries – Yep, your code is here. Miscellaneous – This is my markup language files for readme, issues, documentation, and in the example below the sample output files to be emailed to be moved to GitHub.
I also add the description in the project properties. This will help you define the project more before you get the Miscellaneous files created. This is arrow 3 in the next image.
Step 3
Start loading your files and using this feature.
Once you have loaded your files, save your work.
Below is how this looks in windows file manager.
At the project level it looks like this:
When you have a lot of projects you will have something that looks like this:
In SSMS it looks like this:
To switch projects, close and save all the tabs. In Solution Explorer select the next project that you want to work on.
Nice, clean, and organized. Better yet easy to switch between projects. Helping make your databases; fast, reliable, secure, and less downtime. Need help making this happen?