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)
 How do i truncate a transaction log?

Author  Topic 

mbevon
Starting Member

41 Posts

Posted - 2002-08-05 : 13:35:26

How do i truncate a transaction log?

thanks

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-08-05 : 13:36:12
BACKUP LOG myDatabase WITH NO_LOG

Go to Top of Page

mbevon
Starting Member

41 Posts

Posted - 2002-08-05 : 13:52:37
is this a stored procedure, do i just run it in the query analyser?

thanks

Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-08-05 : 14:00:46
Just change the database name and run it in QA.

Go to Top of Page

yakoo
Constraint Violating Yak Guru

312 Posts

Posted - 2002-08-05 : 14:16:25
Out of curiosity:
Can you run 'BACKUP LOG myDatabase WITH NO_LOG' on a database that is setup for merge/transactional replication without losing any transactions that still need to be replicated? I want to say yes.

Got SQL?
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-08-05 : 14:24:34
Don't say "yes". It may not totally FUBAR the replication, but you'll at least have to do a new snapshot after you truncate the log. I'm not a replication guru though, but if you truncate the log it will definitely interfere with replication.

Go to Top of Page
   

- Advertisement -