Thursday, December 30, 2010

Complete the restore sequence before taking ...

A couple of months ago, I performed an online page restore on our database. Everything has been working fine until we upgraded our SQL server from 2005 to 2008.
Now when I try to setup/run backup on the database .mdf file, I get an error message. The log file is being backed up just fine.
Failed:(-1073548784) Executing the query "BACKUP DATABASE [ADS] TO DISK = N'\\\\<domainName>..." failed with the following error: "Backup of file 'ADS' is not permitted because it contains pages subject to an online restore sequence. Complete the restore sequence before taking the backup, or restrict the backup to exclude this file.
BACKUP DATABASE is terminating abnormally.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

Running the database check:

DBCC CHECKDB ('ADS') WITH NO_INFOMSGS
result
Command(s) completed successfully.
Everything looked fine. 
To resolve this, I ended up creating a new database, and scripted all the tables, stored procedure, and triggers.
Imported all the data with the import/export wizard.
Recreated and set all the permissions on the users.
After this, I could backup the database.

No comments:

Post a Comment