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.
Author |
Topic |
ras2a
Yak Posting Veteran
66 Posts |
Posted - 2006-06-22 : 08:40:39
|
I have had several database errors (reported in event log) on our main database this morning. I assume this is due to faulty hardware etc (that's 'usually' the case, right?). Anyway, I have a maintenance plan in place that runs the 'DBCC CHECKDB ([ourdatabase])' command. However, this command constantly reported no problems with the database (0 errors).1) Is the 'DBCC CHECKDB' command 'comprehensive' enough to find ANY/ALL errors in databases?2) How do you run a repair on a suspected corrupted DB? (I have tried the REBUILD_REPAIR command but it fails...saying something about incorrect syntax (as if it's not a recognised command in QA)3) I currently use Veritas Backup Exec's 'SQL Agent' to backup our SQL DB - I also run a maintenance job (via EM) to backup the DB throughout the day)4) I have never restored our database from the 'file' backup that is created via the maintenance plan - How is this done?5) Once a DB is restored, how do you replay the latest transaction log files etc?..Notes: We are running SQL Server 2000 Std Ed and our database is only around 250MBYes, I'm a complete noob:)Many thanksOops: should have posted in corruption forum. Will post there now, mods can delete this.ras |
|
Kristen
Test
22859 Posts |
Posted - 2006-06-24 : 02:26:59
|
"Is the 'DBCC CHECKDB' command 'comprehensive' enough to find ANY/ALL errors in databases?"yes"How do you run a repair on a suspected corrupted DB?"Best option is usually to restore from backup"(I have tried the REBUILD_REPAIR command but it fails...saying something about incorrect syntax"DBCC CHECKDB will tell you the minimum option you need to effect a repair - that might include Data Loss, but if it does that will be clear from the Option name DBCC recommends. Its usually a bit pointless repairing a database with data loss, right?!, hence restore from backup is usually preferred.You backups may be corrupted too, of course, so it would be prudent to restore them to a different machine, and check the restored database with DBCC CHECKDB before overwriting your working database - which might yet turn out to be the best/only data copy you have ..."(as if it's not a recognised command in QA)"You can run it in QA - check BoL for the syntax (but if DBCC CHECKDB hasn't reported an error, then there is nothing to be fixed)"I currently use Veritas Backup Exec's 'SQL Agent' to backup our SQL DB"Don't! I answered this in your other thread: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=68277"I have never restored our database from the 'file' backup that is created via the maintenance plan - How is this done?"http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=RESTORE%20syntax%20/%20example,Restore"Once a DB is restored, how do you replay the latest transaction log files etc?."You first restore a Full Backup, then you optionally restore a Differential backup, then you restore every Transaction Log backup, in order, from that point forwards. You can stop at either a "point in time", or with the last TLog backup file you choose to restore.Kristen |
 |
|
Kristen
Test
22859 Posts |
Posted - 2006-06-24 : 02:37:56
|
I now find you also posted this as:http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=68195and I've wasted my time answering here, because I saw that you had zero replies and figured you needed some help, when in fact people have already answered over there.Please don't do double post.Kristen |
 |
|
Kristen
Test
22859 Posts |
|
ras2a
Yak Posting Veteran
66 Posts |
Posted - 2006-06-24 : 07:56:49
|
Apologies |
 |
|
|
|
|
|
|