if exists(select 1 from sys.tables where name='t')
drop table t
go
DECLARE @LAST_LSN BINARY(10)
create table t(col int)
go
dbcc traceon(3505, -1)
go
checkpoint
go
select [Current LSN],[Previous LSN],[Previous Page LSN],PartitionId, Operation,Context,[Transaction ID],[Log Record Fixed Length],[Log Record Length]
from sys.fn_dblog(null,null)
go
insert into t values(1)--
go
--sql server need to allocate space for the new table
select [Current LSN],[Previous LSN],[Previous Page LSN],PartitionId, Operation,Context,[Transaction ID],[Log Record Fixed Length],[Log Record Length]
from sys.fn_dblog(null,null)
go
checkpoint
go
insert into t values(1)--
go
--only insert operation
select [Current LSN],[Previous LSN],[Previous Page LSN],PartitionId, Operation,Context,[Transaction ID],[Log Record Fixed Length],[Log Record Length]
from sys.fn_dblog(null,null)