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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 How to restore MS SQL 2005
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

john.hart
Starting Member

Aruba
1 Posts

Posted - 05/04/2015 :  12:50:41  Show Profile  Reply with Quote
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

United Kingdom
22859 Posts

Posted - 05/04/2015 :  14:25:02  Show Profile  Reply with Quote
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

Aruba
1 Posts

Posted - 05/05/2015 :  09:23:02  Show Profile  Reply with Quote
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

United Kingdom
22859 Posts

Posted - 05/05/2015 :  10:34:50  Show Profile  Reply with Quote
REPAIR_FAST does nothing (since before SQL 2005 !! )
Go to Top of Page

jeffw8713
Aged Yak Warrior

USA
819 Posts

Posted - 05/05/2015 :  13:54:48  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000