none
How to find out sql text in table MSdistribution_history

    Frage

  • Hi all.

    I had an result when select.

    select time,cast(comments as xml) as comments,current_delivery_rate,delivered_transactions,error_id,xact_seqno,runstatus ,delivery_latency,delivered_transactions from MSdistribution_history with (nolock)  where delivered_transactions=0


    -------result as: 

    Time| comment| curr| delive_trans| error_id| xact_seqno| runstatus| deliver_latency| delivered_transactions
    5/2/2018 <stats state="2" fetch="517" wait="15694" cmds="75390" callstogetreplcmds="355864"><sincelaststats elapsedtime="300" fetch="0" wait="300" cmds="75390" cmdspersec="251.000000" /><message>Raised events that occur    when an agent's reader thread waits longer than the agent's -messageinterval time. (By default, the time is 60 seconds.) If you notice State 2 events that are recorded for an agent, this indicates that the agent is taking a long time to write changes to the destination.</message></stats> 0 0 0 0x00004A960015166000A7000000000000 3 31157 0

    And now, i want to know sql command by this *xact_seqno*.

    PS: i have already run

    select * from msrepl_commands WITH (nolock) where xact_seqno =0x00004A960015166000A7000000000000

    or

    select * from msrepl_commands WITH (nolock) where xact_seqno =0x00004A960015166000A7

    but didn't have result

    Thanks and regards

    Tunc

    Donnerstag, 3. Mai 2018 09:17

Antworten

Alle Antworten

  • Have you tried using sp_browsereplcmds?
    • Als Antwort markiert Tunc_citi Freitag, 4. Mai 2018 01:33
    Donnerstag, 3. Mai 2018 13:30
    Moderator
  • Have you tried using sp_browsereplcmds?

    Thank Hilary.

    i tried and found out.

    msrepl_commands  only save information in period time, so that, if events happend to late, no way to get infor from there.

    Freitag, 4. Mai 2018 01:33