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)
 LogShipping Breaks after Truncate & Shrink DB Commands Issued

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-09-07 : 08:50:15
Shehbaz writes "I have a problem with log shipping...that is the log file from the Source DB grows to 750MB each day after a process is run daily...this log file needs to get truncated with the sql below:

backup log DB1 with TRUNCATE_ONLY
WAITFOR DELAY '00:01:00'

DBCC SHRINKDATABASE (DB1, 1, TRUNCATEONLY)


But with a logshipping plan that I have in place, this sql breaks logshipping.... Wht do I need to do so that logshipping does not break. The SQL above is a last step in a DTS package. Do I need to perform a full backup as shown below..Thanks for your help...


BACKUP DATABASE DB1
TO DISK c:\backups\DB1

backup log DB1 with TRUNCATE_ONLY
WAITFOR DELAY '00:01:00'

DBCC SHRINKDATABASE (DB1, 1, TRUNCATEONLY)"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-09-07 : 08:53:41
BACKUP LOG WITH TRUNCATE_ONLY will definitely break log shipping. Taking that out will probably alleviate the problem.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-09-07 : 13:31:49
Why does the log file need to get truncated though? Perhaps you just need to backup the tlog more frequently. How often are you doing it now?

Tara
Go to Top of Page
   

- Advertisement -