FW: trans log is still big after db backup

FW: trans log is still big after db backup

 

  

It's a little complicated why your log is still large. You can read about it
in BOL if interested. But Sql 2000 addressed the problem and is now easier
to deal with. For shrinking a sql7 transaction log you can try something
like the following: it does work.

dump tran pubs with no_log
DBCC SHRINKFILE (pubs_log, 10, NOTRUNCATE)

DBCC SHRINKFILE (pubs_log, 10, TRUNCATEONLY)

use dbname
go
create table t1 (char1 char(4500))
go

declare @i int
select @i = 0
while (1 = 1)
begin
while (@i < 100)
begin
insert into t1 values ('a') select @i = @i +1
end
truncate table t1
backup log pubs with truncate_only
end
go



-----Original Message-----
From: Fang, Elaine [mailto:Elaine.[Email Address Removed] Thursday, October 03, 2002 10:02 AM
To: LazyDBA.com Discussion
Subject: trans log is still big after db backup


Dear list,

Here is the question from one of my coworker who works in a different site:

"The database still wasn't marked backed up this morning. I went ahead and
backed it up to a disk device, C:\MSSQL7\BACKUP\TestlabBackup. I then
truncated the transaction log, and then did another backup. This was all
done from the Enterprise Manager interface. Now, the database does show it
was backed up. The transaction log file size is still 81 MB, and for a 18M
data file, that just doesn't sound right."

According to him, this is not a very heavily traffic server, which is kind
of weird for the trans log size.

Any suggestions?

Thanks,
Elaine









---------------------------------------------------------------------
To unsubscribe, e-mail: mssqldba-[Email Address Removed] additional commands, e-mail: mssqldba-[Email Address Removed]MS Sql Server LazyDBA home page