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 |
|
mdhingra01
Posting Yak Master
179 Posts |
Posted - 2005-05-30 : 14:58:33
|
| I have a suspect database. My log file grew to 105Gb, anyone know approx how long it will take to rebuild the database.Thanks |
|
|
eyechart
Master Smack Fu Yak Hacker
3575 Posts |
Posted - 2005-05-31 : 02:31:29
|
| that is kinda funny. How large is your database (not the logfile)?can you free up space on the volume you have your logfile? I would suggest you try to free up several gigs of space, and then shutdown your server. Copy your datafiles somewhere safe and then bring it back up and see if the database goes through a recovery and goes back to normal. If it does, take an immediate backup and then run DBCC checkdb.you need to determine if this databse requires full log mode. If it does, then you need to schedule regular tlog backups. regular means every hour, or every 15 mins or every whatever. That kinda depends on how busy your system is and how much data you are willing to lose in worst case scenario.backing up 105GB of tlogs is going to take damn near forever. You might want to consider just switching to simple mode and then back to FULl mode (after you have recovered, backed up your db and run dbcc checkdb). This will quickly truncate the huge tlog. You can then do a shrink operation on it to get it down to a manageable size.Whatever you do, do not detach your database with it in a jacked up state. You will most likely never recover it if you do do this.so, recap:1. free up space on your data drive (where you have MDF and LDF files)2. Gracefully shutdown your SQL Server3. copy the MDF and LDF files used by your suspect database somewhere safe. This is an extremely important step, do not skip it.4. Bring the SQL Server back online, a database recovery will begin5. keep your fingers crossed and hope that your database goes back to yellow6. backup the database7. run dbcc checkdb8. truncate that tlog and shrink itpost back if you have any problems on those steps. btw, this is the first method of recovery you should try. If you have problems, there are more advanced steps you need to take.Oh, to answer your question, the time estimate is impossible for us to determine since we don't know anything about the size of your database, the hardware it is running on, the extent of the damage or why it happened and the skill of the DBAs doing the recovery. Realistically, you could be down for 20 minutes or 20 hours, it all depends.-ec |
 |
|
|
|
|
|
|
|