Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 How to restore MS SQL 2005

Author  Topic 

john.hart
Starting Member

1 Post

Posted - 2015-05-04 : 12:50:41
The other day I faced the damaged base of server (MS SQL 2005) which works with failure, and it is impossible to restore by testing correction (the checksum error takes off). Thus the base isn't unloaded in the file - the same mistake. Therefore it wasn't succeeded to restore base. Advise, what should I do, to save base?

Kristen
Test

22859 Posts

Posted - 2015-05-04 : 14:25:02
Can you restore from an older Backup file?

If your database is using FULL Recovery Model then you can restore an old Full backup, and then restore ALL the Log Backups since then. It just takes longer than restoring from the most recent Full backup file.
Go to Top of Page

MIRELIA
Starting Member

1 Post

Posted - 2015-05-05 : 09:23:02
I can advise to try to restore base by testing of the SQL. Here are the commands:
DBCC CHECKDB ('database', REPAIR_FAST)

DBCC CHECKDB ('database', REPAIR_REBUILD)
If previous two didn't help, then it is already possible to apply a third, but it carries behind it a potential data loss, and it is desirable to apply in a hopeless case.
DBCC CHECKDB ('database', REPAIR_ALLOW_DATA_LOSS)
If the command fails because there is no the single-user mode, then it is possible to pass on command
alter database db-name set SINGLE_USER
It is clear that before any tests it is necessary to make a backup copy (means of SQL if unloading is not done).
Or you can try to restore the database using Recovery Toolbox for SQL Server.
https://sql.recoverytoolbox.com/
In addition you can come on information resource and look at recommendations there.
http://www.filerepairforum.com/forum/microsoft/microsoft-aa/sql-server/1914-restore-the-sql-server-database
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2015-05-05 : 10:34:50
REPAIR_FAST does nothing (since before SQL 2005 !! )
Go to Top of Page

jeffw8713
Aged Yak Warrior

819 Posts

Posted - 2015-05-05 : 13:54:48
Before using any of the repair options - please run the integrity check as DBCC CHECKDB {your database} WITH no_infomsgs, all_errormsgs; and post the results here. This will tell us whether or not the database is in fact repairable.

To restore the damaged database you can try setting the continue on error flag during restore - that may help you get past that particular error and get the database restored.
Go to Top of Page
   

- Advertisement -