Forum Moderators: open

Message Too Old, No Replies

Clearing SQL transaction log

How to?

         

Sinner_G

9:52 am on May 23, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



As many others I have limited space on my HD, so I can't allow the transaction log of some databases to take too much space.

When trying to set a primary key on my log file databse I get the following error:

The log file for database 'db_name' is full. Back up the transaction log for the database to free up some log space.

I tried to clear the log with

dump tran db_name with truncate_only

and also with

dump tran db_name with no_log

but the transaction log file is still as big as it was.

So my question is pretty simple: what can I do?

Thanks
Sinner

<added>BTW, talking SQL 2000 here</added>

Gizmare

6:59 pm on May 23, 2003 (gmt 0)

10+ Year Member



I would change your recovery model to Simple. This will start Log Truncation everytime a CHECKPOINT occurs. This should keep your Transaction Logs to a min..