patternsqlMinor
Relocate all files to folder checkbox unavailable sql server 2012
Viewed 0 times
2012allsqlcheckboxrelocatefilesfolderserverunavailable
Problem
Using SQL 2012 Enterprise edition
Following instructions here for restoring a backup:
http://msdn.microsoft.com/en-us/library/ms186390.aspx#Restrictions
I need to be able to rename the database because it is the second copy on the instance (testing purposes). But I cannot rename it nor change the folders that it will restore the MDF/LDF files to.
For whatever reason the "Relocate all files to folder" checkbox is not available.
Restoring form a SQL 2005 backup.
Following instructions here for restoring a backup:
http://msdn.microsoft.com/en-us/library/ms186390.aspx#Restrictions
I need to be able to rename the database because it is the second copy on the instance (testing purposes). But I cannot rename it nor change the folders that it will restore the MDF/LDF files to.
For whatever reason the "Relocate all files to folder" checkbox is not available.
Restoring form a SQL 2005 backup.
Solution
Try to do this with T-SQL:
restore database YourDatabase_NewName
from disk = 'C:\YourDir\YourDatabase.bak'
with
move 'YourDataFileName' to 'C:\DataDir\DataFile.mdf',
move 'YourLogFileName' to 'C:\LogDir\LogFile.ldf'
goCode Snippets
restore database YourDatabase_NewName
from disk = 'C:\YourDir\YourDatabase.bak'
with
move 'YourDataFileName' to 'C:\DataDir\DataFile.mdf',
move 'YourLogFileName' to 'C:\LogDir\LogFile.ldf'
goContext
StackExchange Database Administrators Q#21414, answer score: 5
Revisions (0)
No revisions yet.