Re: Replication Faliuer Status

From: frankm (frankm_at_nospam.postalias)
Date: 01/07/05


Date: Fri, 7 Jan 2005 07:53:41 -0600

Try this ... it's one of those "I wrote it for myself" things...
You have to adjust the "TOP" value for the number of subscribers you have.
-------------------------
use distribution
go
select Subscriber_DB,
        'Run Status' =
           CASE RunStatus
             WHEN 1 THEN 'Start'
             WHEN 2 THEN 'Succeed'
             WHEN 3 THEN 'InProgress'
             WHEN 4 THEN 'Idle'
             WHEN 5 THEN 'Retry'
             WHEN 6 THEN 'Fail'
             WHEN 23 Then 'Ibison did it'
             ELSE 'Unk?'
           END,
       Delivery_Latency as 'Latency ms',--Delivery_Latency / 60000.00 as
'Latency mins',
        cast(Duration / 3600.00 as decimal(8,2)) as 'Dur(Hrs)',
        cast(Delivered_Transactions as varchar(10)) + ' (' +
cast(Delivered_Commands as varchar(12)) + ')' as 'DelTrans (cmds)',
        cast(Delivery_Rate as int) as 'Del Rate',Total_Delivered_Commands as
'TotalDelCmds',
        [Time],Start_Time
from MSDistribution_History join MSDistribution_Agents on Agent_ID = [ID]
where [time] in (select top 3([time]) from MSDistribution_History order by
time desc) and
      name in (select distinct name from MSDistribution_Agents )
order by SubscriberDB

-----------------------------------

"Hilary Cotter" <hilary.cotter@gmail.com> wrote in message
news:uLf%23A8$8EHA.1228@tk2msftngp13.phx.gbl...
> You shouldn't have to check the status as replication is essentially an
> asynchronous process.
>
> You could use sp_MSenum_replication_agents to tell you the status however.
>
> usage is sp_MSenum_replication_Agents @type=1
>
> where type=
> 1--snapshot
> 2--logreader
> 3--distribution
> 4--merge
> 5--misc
> 9--queue reader
>
> here is a list of what the values in the status column represent
> 1--starting
> 2 --stopped/completed
> 3--executing
> 4--competed/idle
> 5--retry
> 6-- failed
> -23 --Paul Ibison has been messing with your server
>
>
>
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> "Sharad" <Niitmalad@yahoo.co.in> wrote in message
> news:171401c4f3f1$284b7c00$a501280a@phx.gbl...
> > Dear Friends
> >
> > Please suggest where i can get the status for the
> > replication ( Same is working or in failed status ). What
> > i want to do is when the user is taking the INVOICENUMBER
> > from the application it should check for the status of
> > the replication if the same is working or not.
> >
> > Your guidance will enable me to solve the problem.
> >
> > Thanks and best regards
> > Sharad
>
>



Relevant Pages

  • Re: Can merge replication be used to keep two database in sync
    ... suggest you follow up with Phil if you have more questions about his remarks ... Looking for a SQL Server replication book? ... You can use the conflict viewer to "rollback" replication changes, ... >> there dozens of subscribers, but over 90% of the changes occured on the ...
    (microsoft.public.sqlserver.replication)
  • Re: Can merge replication be used to keep two database in sync
    ... You can use the conflict viewer to "rollback" replication changes, ... Looking for a SQL Server replication book? ... > there dozens of subscribers, but over 90% of the changes occured on the ...
    (microsoft.public.sqlserver.replication)
  • Re: Can merge replication be used to keep two database in sync
    ... the number of subscribers before it started slowing down. ... If you are going to post numbers, particularly with the replication engine, ... in SQL Server 6.5, I've had implementations in production that have ALWAYS ... Broken down by transaction per minute ...
    (microsoft.public.sqlserver.replication)
  • Re: Merge or Trans with QUS best when publishing partitions of database to slow subscribers
    ... With queued replication the single queue does serve all subscribers. ... No real conflict detection and resolution. ... The majority of the DML should originate on the publisher. ...
    (microsoft.public.sqlserver.replication)
  • Re: Trasactional Replication problems
    ... >should have 13000 lines after a snapshot. ... Enable Replication Agents for Logging to Output Files in SQL ... >all data will be transfer to the subscribers in this transactions? ... which means that all available transactions are ...
    (microsoft.public.sqlserver.replication)