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)
 Truncating SQL Databse Transaction Log

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-11-04 : 09:31:11
Tony Naik writes "I am running a automated import process through DTS which imports nearly 400000 records every day. This server is in production for more then 2 months and suddenly I realised the database transaction log file is nearly 20 GB. I tried backing up the log file but there is no enough space on hard drive to backup the transaction logs. I tried to run shrink command , but that didn't work. Is there any way I could truncate this log file. The database is only 145 MB in size. "

rihardh
Constraint Violating Yak Guru

307 Posts

Posted - 2002-11-04 : 09:54:51
DBCC SHRINKDATABASE or DBCC SHRINKFILE should do the job...

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2002-11-04 : 13:49:09
You might want to change your recovery model to simple if you don't plan on backing up the transaction logs. Here is the command to fix your problem: backup log <dbname> with NO_LOG or use backup log <dbname> with TRUNCATE_ONLY

If you want to be able to have the option of restoring to a point in time when you have a problem, then start backing up your transaction log.

Go to Top of Page
   

- Advertisement -