My Profile Photo

Ashley Poole


- Speaker -
- Senior Software Developer -
- Co-organiser of @ShropshireDevs -
- Site Reliability Engineering Advocate -


MSSQL Default Backup Location

Default backup location

-- Query location
EXECUTE [master].dbo.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'SOFTWAREMicrosoftMSSQLServerMSSQLServer', N'BackupDirectory'
-- Set location
EXECUTE [master].dbo.xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'SOFTWAREMicrosoftMSSQLServerMSSQLServer', N'BackupDirectory','REG_SZ', 'SERVERNAMESHARENAMEFOLDERNAME'

The same can be done using Regedit Local Machine > Software > Microsoft > Microsoft SQL Server > ‘INSTANCENAME’ > MSSQLServer Key = BackupDirectory

Posted on databases, server-admin with tags: sql-server

comments powered by Disqus