When log shipping is setup, does it truncate the transaction log when it is
copied to the shared folder to be send to the standby server?
We currently have a prod database that generated about 30 Gig of transaction
logs a day. I have a log of 20 GB and I setup an alert that fires when the
log becomes 90 full to backup the log and truncate it. I don't really need
the backup of the log, but I do need to maintain the under 20 GB transaction
log, so if log shipping automatically truncates it then I don't have a
problem.
Thanks in advance for any replys.
It doesn't truncate the log. What it does is mark the virtual log files as
unused.
To see this run the following
create database DumpMe
GO
use DumpMe
go
Create table test(pk int primary key identity(1,1), charcol char(8000))
go
begin tran
declare @.counter int
set @.counter =1
while @.counter < 100000
begin
insert into test (charcol) values(replicate('x',8000))
select @.counter=@.counter+1
end
commit tran
dbcc loginfo
--notice how all the status columns for all these vlf's have a value of 2.
this means the VLF has data in.
--now backup your transaction log
backup log [DumpMe] to disk='c:\dumpme.bak'
--run dbcc loginfo again. notice how this time the status column is all 0.
dbcc loginfo
If you have a 30 Gig database and a 20 Gig (or 90 Gig - not sure what you
mean from your post), your transaction log is probably not sized adequately.
You should dump it more frequently - perhaps every minute. Watch out for
http://support.microsoft.com/default...b;en-us;824430
I'm not saying frequent dumps will cause this problem - it might however.
"Dazed and Confused" <DazedandConfused@.discussions.microsoft.com> wrote in
message news:FB07D21E-4830-4AD1-A4E7-D898E6D8EBC0@.microsoft.com...
> When log shipping is setup, does it truncate the transaction log when it
is
> copied to the shared folder to be send to the standby server?
> We currently have a prod database that generated about 30 Gig of
transaction
> logs a day. I have a log of 20 GB and I setup an alert that fires when
the
> log becomes 90 full to backup the log and truncate it. I don't really
need
> the backup of the log, but I do need to maintain the under 20 GB
transaction
> log, so if log shipping automatically truncates it then I don't have a
> problem.
> Thanks in advance for any replys.
|||Truncation is normally meant to mean a reduction in size
of the logical log file (as opposed to shrinking which
applies to the physical file), so marking the virtual log
files as unused is essentially truncation?
Rgds,
Paul Ibison
No comments:
Post a Comment