Restore Failed Error - Urgent Reply Please!

  • Hi.

    I have a database backup file (.bak) taken from SQL Server 2005 Express which was running on a 32-bit Windows XP. Now I have 64-bit windows 7 installed on my PC. i installed SQL Server 2005 Express and tried to restore the backup and got the following error. Then I removed Sql Express 2005 x64 and installed Sql Express 2008 x86. To see if the reason is version compatibility. But got the same error.

    Restore failed for server "localhost". (Microsoft.SqlServer.Express.Smo)

    Additional Information:

    System.Data.SqlClient.SqlError: The operating system returned the error '5(failed to retrieve text for this error. Reason: 15100)' while attempting 'RestoreContainer:ValidateTargetForCreation' on 'C:\Program Files (x86)\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\EMSDB.mdf'

    I don't exactly remember but I think giving path in additional information of error was different with te error I got in Sql 2005.

    The wonderful part is that the error shows that it was targeting to restore the database to root of sql server path not to DATA folder.

    I MUST fix this error within next few hours.

    Any Idea is highly appreciated.

  • Do you have the RESTORE script you are attempting to use?

    I'm assuming because you stated you are missing the Data path that the file is being restored to the wrong directory. You may need to add or modify your MOVE options.

    T-SQL RESTORE

    http://msdn.microsoft.com/en-us/library/ms186858.aspx

  • Hi.

    I am using SQL Server Management Studio Express. I am running a T-SQL manually.

  • mdvlinquest (10/7/2011)


    Hi.

    I have a database backup file (.bak) taken from SQL Server 2005 Express which was running on a 32-bit Windows XP. Now I have 64-bit windows 7 installed on my PC. i installed SQL Server 2005 Express and tried to restore the backup and got the following error. Then I removed Sql Express 2005 x64 and installed Sql Express 2008 x86. To see if the reason is version compatibility. But got the same error.

    Restore failed for server "localhost". (Microsoft.SqlServer.Express.Smo)

    Additional Information:

    System.Data.SqlClient.SqlError: The operating system returned the error '5(failed to retrieve text for this error. Reason: 15100)' while attempting 'RestoreContainer:ValidateTargetForCreation' on 'C:\Program Files (x86)\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\EMSDB.mdf'

    I don't exactly remember but I think giving path in additional information of error was different with te error I got in Sql 2005.

    The wonderful part is that the error shows that it was targeting to restore the database to root of sql server path not to DATA folder.

    I MUST fix this error within next few hours.

    Any Idea is highly appreciated.

    It sounds like this path:

    C:\Program Files (x86)\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQLdoes not exist. So I would change the path to one that exists so the restore will work.

  • you have OS error 5, thats a permissions error.

    the account running the restore does not have permissions to that directory. you could also try repointing the restore so the .mdf goes into the data directory using the with move clause.

    ---------------------------------------------------------------------

  • use this command to see what an Os error means

    open up a command prompt and type

    net helpmsg errornumber

    ---------------------------------------------------------------------

  • It is often the "restore AS" path for the .mdf and the .log files specified by default that does not belong to the server. Change the path to point to the target directory used by the server instance.

  • Got this error restoring a zipped SE2005 backup from dropbox. It came up when trying to browse to backup Contents, not even attempting to restore yet.

    The code was 15100. Solution was permissions indeed - the unzipped file needed to be unblocked. Rightclick the file in Windows Explorer, button Unblock on the first tab.

    That changed the error to 15105. Then giving Modify permission to Everyone on the file (because I did not care) fixed the problem - able to restore. So not a backup version problem as I first feared, only OS permissions. 😎

    If encountered in sensitive environment a Modify permission to the file of the account running the SQL Server process may be required. Just hypothetising however already. 😛

  • This was removed by the editor as SPAM

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply