05-14-2013 04:51 AM
Hello Everybody,
I have a Backup Exec 2012 environment (just one backup server) and want to restore a SQL-Database (it has recovery model "simple").
When I run the restore without consistency check, the restore ends "successful", but in SQL the database remains "Recovery pending".
When I run the restore with physical consistency check the restore fails with "consistency checks have failed". Database "XY" cannot be opened. It is in the middle of restore.
Has anyone an idea how to fix the issue?
Regards, Georg
Solved! Go to Solution.
05-23-2013 01:26 AM
The issue is fixed.
It comes only if we redirect a SQL-Database, that is not in the standard-SQL-Folder
We do have two drives E:\ for SQL-Database and F:\ for Recovery Logs and there is a folder "data" oneach drive
When we do a redirected restore (in our case same instance, other database-name) from a database that is in a subfolder of "data", then the Database is restored in the subfolder, but the log is restored directly under "F:\". On the F:\-drive in the subfolder of data an empty log-file is created and database resume in "recovery pending"
If we set a defined path in the restore option, both files are restored to this path and everything works fine.
05-14-2013 05:29 AM
This probabely indicates that when the backup was performed there must have been some consistency issues on the database. Were there any errors in the backup job logs? Have you set to perfrom consistency checks on backup jobs.
Anyways, moving forward, you will need to run a few SQL command lines and see what is the error and why is the database in a pending recovery state. 'Recovery pending' means that for some reason SQL cannot run restart recovery on the database. Usually this is because the log is missing or corrupt.
Have you tried to use the Alter Database commands (example :- ALTER DATABASE 'DATBASE NAME' SET ONLINE) It would be best if you have a SQL Admin do this part.
05-14-2013 06:31 AM
Hi Jaydeep,
thank you for your answer.
We make physical consistency checks before backup.
I have the same issue regardless it is a database with "simple" or with "full" recovey model.
There are no errors in the backup job logs. Consistency checks are completed.
The Log-File has been created while restoring, but has 0 KB.
05-14-2013 06:42 AM
The alter database command returns "ALTER DATABASE is not permitted while a database is in the Restoring state"
05-23-2013 01:26 AM
The issue is fixed.
It comes only if we redirect a SQL-Database, that is not in the standard-SQL-Folder
We do have two drives E:\ for SQL-Database and F:\ for Recovery Logs and there is a folder "data" oneach drive
When we do a redirected restore (in our case same instance, other database-name) from a database that is in a subfolder of "data", then the Database is restored in the subfolder, but the log is restored directly under "F:\". On the F:\-drive in the subfolder of data an empty log-file is created and database resume in "recovery pending"
If we set a defined path in the restore option, both files are restored to this path and everything works fine.
05-23-2013 01:32 AM
When you backup the database, is AOF on or off? It should be off.
06-27-2013 11:53 PM
Hi Georg,
I am doing a redirect restore (different instance, same database name)
I choose "Use alternate drive: D:" I got same error "recovery pending".
Did you use "Use the path: " to solve this error?