Error trying to restore database in SQL Server 2012

10,519

What account are you running the SQL Server engine under? Does that account have access to the location of the backup file.

Check out this post on SSC with the same issue.

http://www.sqlservercentral.com/Forums/Topic1455052-2799-1.aspx

In short, try the restoring the database using TSQL code. I usually do. The WITH FILE clause is optional if there is only one backup set.

Can you read the file list of the backup?

-- Can you read the file list
RESTORE FILELISTONLY 
FROM DISK = 'Z:\SQLServerBackups\AdventureWorks2012.bak'
   WITH FILE=1;
GO

Check the validity of the backup.

-- Is this a valid backup?
RESTORE VERIFYONLY
FROM DISK = 'Z:\SQLServerBackups\AdventureWorks2012.bak'
   WITH FILE=1;
GO

Try restoring the database.

-- Simple restore, source and target file names and location are the same
RESTORE DATABASE AdventureWorks2012
   FROM DISK = 'Z:\SQLServerBackups\AdventureWorks2012.bak'
   WITH FILE = 1
   RECOVERY;

If you want to move the files to different names or locations, check out BOL.

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

In short, if it is a permission issue, you should see a error in the query window.

Share:
10,519
Andy
Author by

Andy

Updated on June 05, 2022

Comments

  • Andy
    Andy almost 2 years

    I'm trying to restore a database from a .bak file.

    My problem is that when i open SQL Management Studio and right click on Databases folder and select Restore Database i get the error message:

    No backupset selected to be restored.

    This is before i even select my .bak file.

    I've tried to run Management Studio as an Administrator but still this error when the restore window opens.