I’m in SQL just about every day of the week. Supporting multiple clients with multiple SQL servers in operation, we’re regularly working on databases. Part of that process is to backup and restore databases on our local machines for development.
One of the annoying items about SQL for me is that it wants to bury your database files deep within the Windows program folder for your SQL install. I really don’t want to dig down 7 levels of folder structure to get to my files. I can see how that might be handy and serve as a layer of protection, but for me it’s just annoying.
It took me awhile to find it, but I’ve now found where you can set your default file locations for databases. It’s actually pretty obvious where it is now, but that makes me think they’ve changed how you set this preference. If I didn’t find it before, surely it couldn’t have been that easy initially.
Right click on your main SQL server database and select “Properties” from the right-click menu. Then click on the item labeled “Database Settings”. Almost to the bottom of the screen is a location to specify where you want to keep your database files. You can select different locations for the data and the log file, which could help with management in the future as well, depending on your personal use preferences.
Hopefully that may help you if you’re looking for this in the future. I’m now debating on storing my database files on a removable USB external drive. Just not sure about the risk of storing them on that type of device instead of the main computer hard drive. Does anyone else have experience with SQL databases in this format?