Restore to default directory
tkdennis
Posts: 114
I frequently restore databases to different servers. The Restore Wizard always puts the files in the MSSQL nested Data Directory instead of using the server's configured Database Default Locations specified in the Server Properties. Is there a way to have SQL Backup use the server's Database Default Locations so I don't have to change the directories every time?
Example:
Server Root Directory:
C:\MSSQL\MSSQL10.TEST\MSSQL
Server Default Database Location:
Data: \Database
Log: \Database\Log
SQL Backup default file locations:
Data: C:\MSSQL\MSSQL10.TEST\MSSQL\DATA
Log: C:\MSSQL\MSSQL10.TEST\MSSQL\DATA
Thanks,
Traci
Example:
Server Root Directory:
C:\MSSQL\MSSQL10.TEST\MSSQL
Server Default Database Location:
Data: \Database
Log: \Database\Log
SQL Backup default file locations:
Data: C:\MSSQL\MSSQL10.TEST\MSSQL\DATA
Log: C:\MSSQL\MSSQL10.TEST\MSSQL\DATA
Thanks,
Traci
Comments
SQL Backup's user interface tries to prevent you from restoring to invalid data file locations by changing the file locations to the SQL Server default locations.
I think that SQL Backup was designed under the assumption that when restoring a backup from one server to another, you'll more than likely be moving the files due to an incompatible directory structure between the two servers.
DBA, MCITP
On my SQL 2005 64bit servers I have the data locations stored as values in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.X\MSSQLServer\DefaultData
and
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.X\MSSQLServer\DefaultLog
where X is an integer relating to DB instance/SSRS instance/SSIS instance installed. the keys that you mentioned are blank
i have the same problem that restores try to default to the installation folder rather than my preferred location.
Senior DBA
Careers South West Ltd
I have the same results as Tracy and Dennis. Inconvenient. My two instances default to:
C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA
My SQL Data location is defined as I:\MSSQL\DATA. It would be great if the default restore location could point here.
I'm running 64bit W2K8 w/ SQL2008STD.
Any update on a solution to this problem? I have a DB with partitions and a large number of files so manually remapping these folders in the UI isn't really an option for me.
Thanks,
Brian
Brian
Is there any new info from redgate about this problem?
It is really annoying... especially when you have a database with a lot of files and filesgroups...
:?
Thorsten