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 Development (2000)
 Log File Size

Author  Topic 

jpc82
Starting Member

8 Posts

Posted - 2006-04-20 : 14:47:51
Is there a way to keep a log file in SQL Server 2000 from growing?

I have a secondary DB that I am using to get additional data for my site. The problem is that the secondary DB is usually under very high load, and the people who are responsible for it don't want us to add more load. So we compromised and now every night a data transformation deletes our records, then connects to thier DB and then pulls in the data we need into ours. This way all our data is no more then 24 hours old.

The problem is from all the deleting and creating of thousands of recordes it couses our log to grow very quickly. Is there any way to reduce it? Recovery is not important for our local DB since all it will be doing is getting new data every night.

Kristen
Test

22859 Posts

Posted - 2006-04-20 : 14:55:38
Set the secondary database to SIMPLE Recovery model?

Delete in modest sized batches, rather than all-in-one. Use TRUNCATE TABLE instead of DELETE where you can.

Kristen
Go to Top of Page

druer
Constraint Violating Yak Guru

314 Posts

Posted - 2006-04-20 : 16:13:08
The other thing that you can do is create a job that will backup your log on a very regular basis (every 1/2 hour etc) because until the data is saved the logfile will continue to grow.

Hope that helps,
Daltoh
Go to Top of Page

Krankensteins
Starting Member

24 Posts

Posted - 2006-04-21 : 08:37:19
Set the database recovery model to SIMPLE and log file wile be used only while executes query.
Go to Top of Page
   

- Advertisement -