Wednesday, April 30, 2008

Default location for SQL Backups

In an earlier post, I showed how to change the "model" database to have new databases created in the correct location. In tandem with that, I've found out how to change the default backup location. This one is a little easier:
  • The setting is contained in the registry on a per-instance basis. First, find the MSSQL.[Number] directory for the instance you are working with. 95% of the time, it will be MSSQL.1
  • Open REGEDIT and find the following key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer
  • Change the DefaultBackupLocation key to whatever path you would prefer.

This change effects the wizards related to the maintenance plans and the one-off special backups.

No comments: