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
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Automating log file shrinking

Author  Topic 

Sharjeel
Starting Member

8 Posts

Posted - 2004-03-02 : 06:43:33
Hi,

DB log files grow to enormous sizes on my SQL server creating space issues.
I want to set up an automatic log file shrink job on my db server.can somebody outline a process for this.


Sharjeel


Sharjeel
Server Manager
Mega E-Services.com

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-03-02 : 09:20:57
If you are doing regular backups and transaction log backups, the log files shouldn't just be growing uncontrollably. If you are not doing transaction log backups, you need to set your recovery mode to full. This will stop the log files from growing.

Otherwise, let us know and we can give you a better solution. There's actually already quite a few on here. Just search for log backups and you'll find all kinds of useful links.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-03-02 : 12:49:03
He meant to say set the recovery model to SIMPLE if you aren't going to be doing transaction log backups. But you need to figure out what your organization needs. They might want the ability to restore to a point in time. If so, start backing up the transaction log.

Don't automatically shrink the file or the database unless you know for sure SQL Server won't need that space again. Each time you shrink the database and SQL Server needs the space again, you will receive a performance hit because it has to grow the file.

Tara
Go to Top of Page
   

- Advertisement -