How to clean transaction log using T-LOG backup
use master
go
go
drop database viewlog
go
create database viewlog;
go
go
use viewlog;
go
backup database viewlog to disk='I:\backup\viewlog.bak'
go
backup database viewlog to disk='I:\backup\viewlog.bak'
select count(*) from fn_dblog(null,null) --- 10
create table test ( testing varchar(20));
select count(*) from fn_dblog(null,null) --- 42
create table test ( testing varchar(20));
select count(*) from fn_dblog(null,null) --- 42
backup database viewlog to disk='I:\backup\viewlog.bak'
select count(*) from fn_dblog(null,null) --- 205
insert into test values('times')
Go 10000
Go 10000
select count(*) from fn_dblog(null,null) -- 30522
backup log viewlog to disk='I:\backup\viewlog.back'
select count(*) from fn_dblog(null,null) --15
Comments
Post a Comment