When you install a SQL Server instance you have the opportunity to identify the default location for your instance database backups. If you don’t change the default location for your installation your default backups location will be “C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Backup” (default location for a SQL Server 2016 installation). Overtime you might decide you want to change the default location for database backups. Below I provide you two different ways to change the default location for your database backups.
If you want to change your default location using TSQL then use the following TSQL code:
Note of caution: Use xp_Instance_regwrite with caution. Updating the registry directly if done incorrectly might cause a software issue.
If you’d like to use SQL Server Management Studio (SSMS) to change your default location, then use the following steps:
- Bring up SSMS
- Right click on the instance name and select the “Properties” item:
- On the “Properties” window click on the “Database Settings”
- On the “Server Properties” page you can change “Backup” location under the “Database default locations” section:
See all articles by Greg Larsen