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
 General SQL Server Forums
 New to SQL Server Programming
 How to decrease log file size

Author  Topic 

oko_sakti
Starting Member

6 Posts

Posted - 2005-12-07 : 21:26:48
Dear all,

I wanna ask you how to decrease log file size..?
For example i have database file with data file size is 122,166 Kb
and the database log file is 6,330,176 KB

Thanks,

Oko Sakti Banget

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-12-07 : 23:00:52
Look up DBCC SHRINKFILE in Books Online, there are examples of how to use it to shrink data and log files.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2005-12-08 : 00:38:17
Sounds like you are not making transaction log backups, and your database is set to FULL Recovery Model.

See: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=Log+File+so+big

Kristen
Go to Top of Page

sachinsamuel
Constraint Violating Yak Guru

383 Posts

Posted - 2005-12-08 : 01:15:09
Yes, Transaction log backup will remove all inactive entries in Log file. You can also execute the command

DUMP TRAN <DATABASE NAME> WITH NO_LOG

The above command will truncate the log.

Regards
Sachin


Don't sit back because of failure. It will come back to check if you still available. -- Binu
Go to Top of Page

oko_sakti
Starting Member

6 Posts

Posted - 2005-12-08 : 01:41:58
Ok, thanks for the info, nice to be here..
Go to Top of Page
   

- Advertisement -