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 delete transaction log

Author  Topic 

boreddy
Posting Yak Master

172 Posts

Posted - 2008-08-06 : 01:11:59
got an error
ie.,transactionlog is full
i dont have free space in my server, what can i do for that

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-06 : 01:17:09
Truncate the log and then run a full backup.

BACKUP LOG dbName WITH NO_LOG
BACKUP DATABASE dbName TO DISK = 'E:\Backup\dbName.bak' WITH INIT

If you don't require point in time recovery, then you should switch your recovery model to SIMPLE so that this doesn't happen again.

If you require point in time recovery, then you need to start backing up your transaction log on a regular basis. We backup ours every 15 minutes.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -