SSMS Default Save Location

July 22nd, 2010
by The Grateful DBA

Now, I certainly understand that when a monstrous piece of software as complicated as SQL Server 2008 R2 is released, that there are literally 3.2 gajillion details to get right. And I freely admit that Microsoft got 99% of them right on with this latest release, but this one’s really got me scratching my head.

SSMS allows us to specify a default save location for query execution result sets, just as you would expect an enterprise level product should.


But what SSMS doesn’t allow us to do, is to specify a default save location for the query definition itself. Notice what’s conspicuously missing…


My current position requires me to consistently save scripts to the same folder throughout the day, then go ahead and create a new folder the next day and save that day’s scripts in there. This folder is of course buried 5 or 6 levels deep on my local machine. The process of having to navigate EVERY time through all six levels just to save the script is maddening to say the least. So, what’s a modern DBA to do to alleviate this situation? Well, my work-around saves me loads of time and really wasn’t difficult to set up as I thought at first it might have been.

The “Save File As” menu option does indeed provide us with this handy bar on it’s left side:

It occurred to me that since they were kind enough to offer me a expressway to my desktop, I could leverage that to resolve my problem. And sure enough all it takes is an ordinary shortcut on the desktop that I only have to change it’s definition each morning and viola, I’m two clicks at the most away from being able to save my script into my multi-nested location.

Notice I’ve labeled it “Today,” so that part never has to change. I simply create the new folder with today’s date (the actual nested one…which I have to do anyway) and then quickly change the path the desktop shortcut points to. That’s really all there is to it. Two clicks and I’m saving my script to the proper place.

I know none of this is mind-blowing cutting edge stuff, but it’s certainly made my life easier and I wanted to share this little epiphany with you kind people.

Have a grateful day…Troy

Tags: ,
Posted in SSMS | Comments (3)

  • […] This post was mentioned on Twitter by Troy Gallant, Troy Gallant. Troy Gallant said: [New Blog Post] "SSMS Default Save Location" […]

  • wnylibrarian says:

    Thanks for the heads up! Granted I don’t have the need to save scripts throughout the day as yourself, but I hadn’t noticed that. Thank you.

  • Anton says:

    I completely agree but then again there are a number of stupid omissions and outright bugs in SSMS. There is a bug (Agent job history config) that was accepted as a bug in 2006, and STILL hasn’t been fixed. Hmmm, why do we pay for this again?

  • Leave a Reply

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    Get Adobe Flash player