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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-07-30 : 09:40:11
|
| Ramkumar writes "Dear Sir, My log file was grown to a size of 9 GB. So I could not access my database.Now I want to flush all the transaction log. Even shirinking of the transaction log not helped me much. I was adviced to keep two log files which will be useful in this kind of situation. So kindly inform me how to flush the transaction log or if some other solution exists to reduce my transaction log file size, Kindly inform me.RegardsRamkumar.B" |
|
|
KnooKie
Aged Yak Warrior
623 Posts |
Posted - 2002-07-30 : 10:04:15
|
| You could search this site and find a wealth of information on this topic.look up sp_detachdb and sp_attachdb which may help you.Paul |
 |
|
|
sandesh_moghe
Constraint Violating Yak Guru
310 Posts |
Posted - 2002-07-31 : 00:47:51
|
| What is your hardware configuration of Database server?---------------------------Sandesh - The Messanger |
 |
|
|
cstrong
Starting Member
2 Posts |
Posted - 2002-08-02 : 10:19:06
|
| Hey,Do you backup your transaction log? This would be my first step if you don't. Backing up the log, will remove the inactive portion of the log and then you can run the DBCC SHRINKFILE command (see BOL).If you are backing up the Log file but still running out of space, I would increase your drive capacity. Tell me, do you have the data and logs on the same partition? If so, my personal approach in your situation would be to follow KnooKie's advice. Create seperate data and log partitions, detatch the DB and attatch it, but specify the new partitions.Hope that helps.Clive |
 |
|
|
monkeybite
Posting Yak Master
152 Posts |
Posted - 2002-08-02 : 11:26:03
|
quote: look up sp_detachdb and sp_attachdb which may help you.
I think you may want [sp_attach_single_file_db] instead of [sp_attachdb]. You detach the database using [sp_detachdb], rename the log file, then re-attach using [sp_attach_single_file_db]. It'll create a new (small) log file for you. If all is working well, then delete the old (big) log file. Of course, definitely have a full backup before doing this.Then you can address the reasons for the log growing so large.-- monkey |
 |
|
|
|
|
|
|
|