December 31, 2013 at 7:22 am
I am trying to restore a SQL Express 2008R2 DB to a 2012 Express DB and it's failing with a security error.
I created a full backup from the 2008R2 DB. Then created a DB in 2012 with the same name. When executing the Backup function to restore the 2008DB to the 2012 DB I get the following security error. What am I missing here?
TITLE: Microsoft SQL Server Management Studio
------------------------------
Restore of database 'Lepton' failed. (Microsoft.SqlServer.Management.RelationalEngineTasks)
------------------------------
ADDITIONAL INFORMATION:
System.Data.SqlClient.SqlError: The operating system returned the error '5(Access is denied.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'c:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS2008R2\MSSQL\DATA\Lepton.mdf'. (Microsoft.SqlServer.SmoExtended)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=11.0.3000.0+((SQL11_PCU_Main).121019-1325+)&LinkId=20476
Thanks,
Bill
December 31, 2013 at 7:31 am
i think both the 2008R2 and the 2012 are on the same server, right?
when you try to restore that 2008R2 backup, it's remembering where it's mdf and ldf files were last stored on the disk...see your error message references a file in a 2008R2 folder....and it still exists.
simply change the path for the mdf and ldf files so they will be appropriate for the 2012 instance.
Lowell
December 31, 2013 at 9:53 am
Yes, bot instances of SQLExpress are on the same local machine. Ok, thanks. I'll look at that. I see your point here. I noted that SSMS seemed to be pointing to the 2008R2 mdf but I am restoring from a backup file ( xxx.bak ) which was confusing me.
I'll have to look a this. Not sure where you would change file paths in the SSMS interface for a Restore operation ( never had to before ).
Bill
December 31, 2013 at 11:03 am
Ok, manually changing the file paths fixed it. Don't like this though. In SSMS if I specify a DB as a target to to be restored it seems to me that SSMS should "default" to the mdf/ldf of the specified DB, not one with the same/similar name in another engine just because it "knows" about it.
Thanks,
Bill
March 26, 2014 at 1:48 am
Great! You said it all.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply