Monday, March 19, 2012

dbcc opentran

How do i read this ?
Replicated Transaction Information:
Oldest distributed LSN : (494721:133301:236)
Oldest non-distributed LSN : (494721:133372:1)
What are those values ? What should i watch for between the distributed and
non distributed LSN ?
Which table in the distribution db holds the LSN info so that it needs where
to start from i.e. which record it needs to fetch from the log file to
insert into the distribution db ?
Thanks
Hassan,
this is my take on the DBCC OPENTRAN -
if your log reader is keeping up, the Oldest non-distributed LSN is (0:0:0):
Oldest distributed LSN : (10:384:4)
Oldest non-distributed LSN : (0:0:0)
if it's not able to keep up or is disabled, the output will be in the
following format:
Oldest distributed LSN : (10:388:4)
Oldest non-distributed LSN : (10:390:1)
If you have an open transaction, the format of the output will include a
section at the top:
Oldest active transaction:
SPID (server process ID) : 55
UID (user ID) : 1
Name : mytran
LSN : (10:391:1)
Start time : May 16 2005 10:10:28:920AM
Replicated Transaction Information:
Oldest distributed LSN : (10:388:4)
Oldest non-distributed LSN : (10:390:1)
Using this, you can use dbcc inputbuffer (55) to find the open transaction's
TSQL, and then decide to kill it if necessary.
So, in your case you don't have any open transactions, and your log reader
agent has not read some (committed) transactions from the transaction log,
so they're not yet written to the distribution database. The numbers in
brackets are the log sequence numbers. You can run select * from
::fn_dblog(null,null) to have a look at the list of these, or for more
details you can see them in LogExplorer.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

No comments:

Post a Comment