Discussion:
transaction logs
(too old to reply)
unknown
2006-08-16 04:07:13 UTC
Permalink
Hi,
Anybody can tell me, how to read/interpret each of the
transactions logged (found at backup.log) is an update
transaction or delete transaction or insert transaction? or
can i know what is the data being inserted or updated?

thanks.
SKH
2006-08-21 03:10:32 UTC
Permalink
Hi,

Best option is turn on auditing and audit 'cmdtext' for the logins for which you
need to see the data being inserted or the operation being performed.

dbcc log() will give some information about the transactions in the current log.
The syntax is ...

dbcc log[(dbid,objid,pageno,rowno,nrecords,type,[,printopt])]

where ...

dbid = database id
objid = object id
pageno = Page number or 0 (for all pages)
rowno = Row number or 0 (for all rows)
nrecords = number of records that is returned. (-1 then records are returned
starting from the beginning of log. 0/1 then records are returned from the end
of the log.
type = Type of transaction .. (-1 for all, 4 for INSERTS, 5 for DELETES, 9 for
direct UPDATES etc.)
printopt = Display options (0 for display header/data, 1 display header only)

For e.g.

dbcc log(17,224000798,0,0,-1,-1,0)

LOG SCAN DEFINITION:
Database id : 17
Backward scan: starting at end of log
log records for object id 224000798
maximum of 1 log records.

LOG RECORDS:
INSERT (7108,0) sessionid=7107,20 [REPLICATE]
attcnt=1 rno=0 op=4 padlen=3 sessionid=7107,20 len=72
odc_stat=0x0008 (0x0008 (LHSC_REPLICATE))
loh_status: 0x8 (0x00000008 (LHSC_REPLICATE))
objid=224000798 pageno=689 offset=134 status=0x800 (0x0800
(XSTAT_EXPAGE))
cid=0 indid=0
old ts=0x0000 0x0002fd25 new ts=0x0000 0x0002fd2c
xrow:
221b41054 ( 0): 02060000 00020011 42425858 58030d0a ........BBXXX...
221b41064 ( 16): 08 .


Total number of log records 1
DBCC execution completed. If DBCC printed error messages, contact a user with
System Administrator (SA) role.


Don't forget dbcc traceon(3604) before running dbcc log.

HTH

Cheers
Sukhesh



On 15 Aug 2006 21:07:13 -0700,
in sybase.public.ase.backup+recovery
Post by unknown
Hi,
Anybody can tell me, how to read/interpret each of the
transactions logged (found at backup.log) is an update
transaction or delete transaction or insert transaction? or
can i know what is the data being inserted or updated?
thanks.
Sukhesh

Loading...