Push and Pull Transaction Replication

How do we know if the current replication is PUSH or PULL and where the distributor database is at Publisher or Subscriber?
Thanks,

Try the below:
--First you find the distributor servername using the below running in publisher
Use master
EXEC sp_helpdistributor;
--Then you can run the below to find the type (use distributor database)
SELECT
(CASE
WHEN mdh.runstatus = '1' THEN 'Start - '+cast(mdh.runstatus as varchar)
WHEN mdh.runstatus = '2' THEN 'Succeed - '+cast(mdh.runstatus as varchar)
WHEN mdh.runstatus = '3' THEN 'InProgress - '+cast(mdh.runstatus as varchar)
WHEN mdh.runstatus = '4' THEN 'Idle - '+cast(mdh.runstatus as varchar)
WHEN mdh.runstatus = '5' THEN 'Retry - '+cast(mdh.runstatus as varchar)
WHEN mdh.runstatus = '6' THEN 'Fail - '+cast(mdh.runstatus as varchar)
ELSE CAST(mdh.runstatus AS VARCHAR)
END) [Run Status],
mda.subscriber_db [Subscriber DB],
mda.publication [PUB Name],
CONVERT(VARCHAR(25),mdh.[time]) [LastSynchronized],
und.UndelivCmdsInDistDB [UndistCom],
mdh.comments [Comments],
'select * from distribution.dbo.msrepl_errors (nolock) where id = ' + CAST(mdh.error_id AS VARCHAR(8)) [Query More Info],
mdh.xact_seqno [SEQ_NO],
(CASE
WHEN mda.subscription_type = '0' THEN 'Push'
WHEN mda.subscription_type = '1' THEN 'Pull'
WHEN mda.subscription_type = '2' THEN 'Anonymous'
ELSE CAST(mda.subscription_type AS VARCHAR)
END) [SUB Type],
mda.publisher_db+' - '+CAST(mda.publisher_database_id as varchar) [Publisher DB],
mda.name [Pub - DB - Publication - SUB - AgentID]
FROM distribution.dbo.MSdistribution_agents mda
LEFT JOIN distribution.dbo.MSdistribution_history mdh ON mdh.agent_id = mda.id
JOIN
(SELECT s.agent_id, MaxAgentValue.[time], SUM(CASE WHEN xact_seqno > MaxAgentValue.maxseq THEN 1 ELSE 0 END) AS UndelivCmdsInDistDB
FROM distribution.dbo.MSrepl_commands t (NOLOCK)
JOIN distribution.dbo.MSsubscriptions AS s (NOLOCK) ON (t.article_id = s.article_id AND t.publisher_database_id=s.publisher_database_id )
JOIN
(SELECT hist.agent_id, MAX(hist.[time]) AS [time], h.maxseq
FROM distribution.dbo.MSdistribution_history hist (NOLOCK)
JOIN (SELECT agent_id,ISNULL(MAX(xact_seqno),0x0) AS maxseq
FROM distribution.dbo.MSdistribution_history (NOLOCK)
GROUP BY agent_id) AS h
ON (hist.agent_id=h.agent_id AND h.maxseq=hist.xact_seqno)
GROUP BY hist.agent_id, h.maxseq
) AS MaxAgentValue
ON MaxAgentValue.agent_id = s.agent_id
GROUP BY s.agent_id, MaxAgentValue.[time]
) und
ON mda.id = und.agent_id AND und.[time] = mdh.[time]
where mda.subscriber_db<>'virtual' -- created when your publication has the immediate_sync property set to true. This property dictates whether snapshot is available all the time for new subscriptions to be initialized. This affects the cleanup behavior of transactional replication. If this property is set to true, the transactions will be retained for max retention period instead of it getting cleaned up as soon as all the subscriptions got the change.
--and mdh.runstatus='6' --Fail
--and mdh.runstatus<>'2' --Succeed
order by mdh.[time]
Ref: http://stackoverflow.com/questions/220340/how-do-i-check-sql-replication-status-via-t-sql
EDIT: You can remove unwanted info while executing. I just provided as it is from the reference site thinking that would be useful to you.

Similar Messages

  • Inbound email receiving and processing: push and pull

    Hi Experts
    i know there are 2 alternative ways to configure the inbound email receiving and processing: push and pull
    (see also /people/cathy.ma/blog/2009/06/23/introduction-to-the-interaction-center-agent-inbox)
    My question is: what if i configured the email in push and, at the end of day, some emails are not already read by the Contact Center Operator ?
    The day after will the agent see those unread email in the push queue, or in pull in the Agent Inbox (thus transforming them into work item) ?
    Those emails are not lost. True?
    Maybe it is a simplistic question
    thanks for the support
    Angelo T.

    Hello Angelo,
    No, actually. ICI interface "push" emails are handled just like a telephone call. You would never leave a telephone call sitting in the queue at the end of the day, and its the same with ICI emails. The key here is that ICI is real time!  This is quite a different approach than the SAPConnect interface which uses workflow to route the emails to an Inbox (virtual queue). In the Inbox case, of course an agent would see lots of emails sitting in the queue the next day. Hope that helps!
    Regards,
    John

  • Urgent pros and cons in ETL  push and pull technologies

    Hello everybody,
    kindly tell pros and cons in ETL push and pull technologies
    by bala

    Hello everybody,
    kindly tell pros and cons in ETL push and pull technologies
    by bala

  • Pushing and pulling from Premiere Pro CS 5

    Hi,
    Recently, I came across a problem and I was wondering if you could confirm this is a limitation within Production Premium CS 5 or whether I am doing something incorrectly?
    If I render a sequence within Premiere Pro and push it to Encore via Adobe Dynamic Link, the rendered sequence correctly shows its rendering within Encore.  However, if I render my sequence, save, and exit from Premiere Pro and then start Encore and pull the sequence from Premiere Pro via the Adobe Dynamic Link, I don't necessarily keep the rendering.  I know that this has happened when using a 64-bit plugin from a third-party.  The sequence shows with a watermark as if it had never been registered.  The problem further manifests itself by, when I restart Premiere Pro, while the rendering looks intact, if I click on the third-party plugin as if to modify it, it won't let me make changes until I delete the already rendered sequence.  It seems like somehow, the sequence has become corrupted.
    Any thoughts - is this a known problem?  Has this been addressed with CS 5.5?  Are there plans for this to be addressed?  Is there a workaround?
    Thanks,
    Steve

    JSS1138 wrote:
    The pros are faster encodes with superior quality.  I use the free HC Encoder for MPEGs.  You'll also need Avisynth to use it.  The process is somewhat cumbersome, but if you have the time and want the quality, it's noticeably better, in my opinion.
    To add to this, I've been producing commercial blu-rays using the free x264 encoder.  The quality is unmatched by any commercial encoder, however there are some features absent that some commercial producers need (such as the ability to directly place I-frames, re-encode a section of GOPs with different bitrate targets, etc. which commercial encoders like CineVision can provide).  If you don't have any need for those, x264 is the way to go.  As quality is more important to me than bitrate, I use the single-pass constant ratefactor "--crf" mode with something better than the default, like 18 or 16, and it has never let me down.
    Just be prepared to wait a while if you have a longform project.  x264 is very fast, taking advantage of multi-core machines, but it cannot utilize the GPU/CUDA for encoding.  A 3.5 hour 720p60 project (over 750,000 individual frames) at maximum quality takes a full 24 hours to encode on a 3.2GHz core i7, with all hardware threads at 100% (so make sure your machine is stable if it is overclocked!).

  • Transfer type Push and Pull

    Hello for all,
    I'm performing automatic replication using the Archiver. In CS Source and Target I set up an outgoing provider, but I have doubts about the type of transfer, in this case: Pull and Push. Because I have created a provider in the target I believe is the transfer by using Push, correct? and if so, how can I do to know if the source has received notification that the transfer to the target was successful?
    Regards,

    Steve Hamilton has a nice concise writeup on the SENA Sound Bites blog that describes this nicely.
    http://senasystems.blogspot.com/2012_04_01_archive.html

  • How to Upload Data into SCM(Push and Pull)

    Iam new to SCM.( I Have exposure in XI ),Plz help me regarding this one.
    1) How to get(pull and Push) DATA from SAP to SCM Server?
    2) Usually it is done with BAPI or ALE(i never used this
       iam guessing), but i want to use XI between these  
       Servers.(SAP to SAP),(SAP to Non-SAP) and 3rd Parties.
    Thanks in advance
    VEN

    hello ven..
    u can definitely transfer data to and from one server to another...let it be with connectors or xi...
    and as u said u have exposure to Xi...the following solution might help...
    SAP XI belongs to SAP Netweaver Technology, whereas BC is an Integration tool provided by Webmethods.
    <b>SAP XI is based on a model called "Hub & Spoke" and Business Connectors are "point to point". So by using XI, what happens is that you do not redesign Solutions once again.
    With XI you save the entire integration knowledge of a collaborative process centrally in SAP XI: Objects at design time in the Integration Repository and objects at configuration time in the Integration Directory. In this way, SAP Exchange Infrastructure follows the principle of shared collaboration knowledge: You no longer need to search for information about a collaborative process in each of the systems involved, but can call this information centrally instead. This procedure considerably reduces the costs for the development and maintenance of the shared applications.
    Also SAP XI comes with pre-configured solutions bundled along with it, so you can straight-away use the solution instead of redesigning.
    Also i believe SAP XI is integrated as a required solution for some new mySAP solution like SRM, there are some scenarios within SRM requires SAP XI to be used and we cannot use BC's there.
    .</b>
    hope the above helps...
    regards..
    vishal

  • Push and Pull Subscriptions

    Hi , I have created a snapshot publication, for this i created a push subscription. Is it possible to create pull subscription also on the same publication ?

    Hi Pavan,
    You can create a new pull subscription on the same publication after creating a push subscription. I make a test about your scenario, everything works as expected and the data is replicated properly.
    However, please note that after a subscription is created, it cannot be changed from one type to another.
    For more information, please view the following article.
    Subscribe to Publications: https://msdn.microsoft.com/en-us/library/ms151170.aspx
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • Dropping existing subscriber from a pualisher who has multiple subscriber in Transactional Replication

    Hi Everyone,
    We have a transactional replication(one publisher and multiple subscribers). If I drop one of subscribers, will this cause any locking or performance problem for publisher or other subscribers? I am going to do  that using SSMS.
    Thanks
    Aspet
    A.G

    Hi Mourmansk,
    Agree with others,In addition, before you deleting Subscriber, we need to verify that Publisher define a source database where replication starts, Subscriber is the destination database where replication ends. If you want to drop a Subscriber, it means that
    you should delete the related pull subscription or push subscription in transaction replication. Usually, for example, to delete a push subscription, you use
    sp_dropsubscription on the publication database, and execute sp_subscription_cleanup to remove replication metadata in the subscription database. There is a similar issue about delete subscriber from replication, you can review it.
    http://social.technet.microsoft.com/Forums/en-US/1354e29f-4904-46dd-8e64-d1150263ba7c/unable-to-drop-subscriber-from-replication?forum=sqlreplication
    For more information, see:http://msdn.microsoft.com/en-us/library/ms151212.aspx
    http://msdn.microsoft.com/en-us/library/ms151861.aspx
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • How to install Nokia Messaging Software (Push and ...

    How to install Nokia Messaging Software (Push and Pull email) on SD CARD?
    I have got Nokia Push email instaled on NOKIA 6110 Navigator. This instalation take all of my phone internal memory, and mailbox is in phone internal memory too. How to install or move program or mailbox to SD card?

    I'm surprised that Nokia will spend all that effort to miss out on one little detail - EMAILS WITH ATTACHMENTS TAKES UP A LOT OF SPACE - The least they could do was allow us to point the application storage to the SDHC card.
    I love the messaging app, but I just can't afford to give up so much phone memory - So it is not getting installed until we can point storage to the SDHC card.

  • Renaming publication articles in transactional replication

    Hello,
    I am using SQL 2012 SE and implementing transactional replication. I need to insert the rows from publisher database tables to new tables, drop the old tables and rename the new tables with the old table names. 
    For example:
    Publisher database tables that are being replicated: 
    Table1
    Table2
    Table3
    and I am going to create new tables in publisher database
    Table1_new
    Table2_new
    Table3_new
    Move data from 
    Table1--->Table1_new
    Table2--->Table2_new
    Table3--->Table3_new
    Drop constraints from and then tables (does this require articles to be removed from replication?)
    Table1
    Table2
    Table3
    Rename 
    Table1_new to Table1
    Table2_new to Table2
    Table3_new to Table3
    Does this require replication to set up from scratch or add the three articles only to replication? Is there a way this can be done without pausing or reinitializing replication or without removing articles and adding them back?
    Thanks. 

    Set  immediate_sync to false.
    Then drop the articles from the subscription and the publication. Add the new ones back in. Add them to the subcribers and then run the snapshot. The snapshot will only be for the newly added tables.
    looking for a book on SQL Server 2008 Administration?
    http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search?
    http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941
    I want to do this as part of a sql server agent job. Is it possible to do with TSQL?
    EXEC sp_dropsubscription 'NewPublication','Table1','Subscriber','Subscriber_db'
    EXEC sp_dropsubscription 'NewPublication','Table2','Subscriber','Subscriber_db'
    EXEC sp_dropsubscription 'NewPublication','Table3','Subscriber','Subscriber_db'EXEC sp_droparticle @publication = 'NewPublication', @article = 'Table1', @force_invalidate_snapshot = 1;
    EXEC sp_droparticle @publication = 'NewPublication', @article = 'Table2', @force_invalidate_snapshot = 1;
    EXEC sp_droparticle @publication = 'NewPublication', @article = 'Table3', @force_invalidate_snapshot = 1;
    go
    use [WesbiteDB]
    exec sp_rename 'Table1','Table1_Old'
    exec sp_rename 'Table2','Table2_Old'
    exec sp_rename 'Table3','Table3_Old'
    exec sp_rename 'Table1_new','Table1'
    exec sp_rename 'Table2_new','Table2'
    exec sp_rename 'Table3_new','Table3'
    go
    use [WesbiteDB]
    EXEC sp_addarticle @publication = 'NewPublication', @article = 'Table1', @source_object = N'Table1', @type = N'logbased', @pre_creation_cmd = N'drop', @destination_table = N'Table1';
    EXEC sp_addarticle @publication = 'NewPublication', @article = 'Table2', @source_object = N'Table2', @type = N'logbased', @pre_creation_cmd = N'drop', @destination_table = N'Table2';
    EXEC sp_addarticle @publication = 'NewPublication', @article = 'Table3', @source_object = N'Table3', @type = N'logbased', @pre_creation_cmd = N'drop', @destination_table = N'Table3';
    EXEC sp_refreshsubscriptions @publication = N'NewPublication';
    Does that look right?

  • Setup transactional replication with pull subscription using the option @allow_initialize_from_backup

    I am trying to setup  transactional replication with pull subscription using the option @allow_initialize_from_backup = true and I am a bit confused on steps involved because at teh end of setup it shows ‘uninitialized subscriber’ in replication
    monitor.
    Publisher, distributor and subscriber are three separte SQL server 2008 R2 servers.
    I executed below steps -
    On publisher SQL server executed sp_addpublication with  options @immediate_sync ='true and   @allow_initialize_from_backup = true  
    On publisher SQL server executed  sp_addarticle to add the articles
    On distribution  SQL server disabled distribution cleanup agent and stopped the distribution cleanup job
    On publisher SQL server created full backup of the publication db
    On subscriber SQL server restored above backup with recovery
    On publisher  executed  sp_addsubscription using options  @subscription_type = N'pull', and @sync_type = N'initialize with backup'
    On subscriber  executed  sp_addpullsubscription  using options  @independent_agent = N'True',@subscription_type = N'pull',@description = N'',@update_mode = N'read only',@immediate_sync = 1
    On distribution  SQL server enabled distribution cleanup agent and started the distribution cleanup job
    At the end of these steps it shows ‘uninitialized subscriber’ in replication monitor.  What am I doing wrong ?
     In the above steps what is the difference between sp_addsubscription and sp_addpullsubscription ? 
    When I setup transactional replication with push subscription using the option @allow_initialize_from_backup = true, I only execute sp_addsubscription on publisher.
    Ravi Kumar

    After the step 7 did you create the  "Pull Subscription Agent" by running the below stored procedure?
    EXEC sp_addpullsubscription_agent
    http://msdn.microsoft.com/en-us/library/ms147834.aspx - Step 6
    "(Optional) For a pull subscription, execute sp_addpullsubscription (Transact-SQL) and
    sp_addpullsubscription_agent (Transact-SQL) at the Subscriber on the subscription database. For more information, see
    Create a Pull Subscription."
    Check this article for step by step with example-
    http://www.sqlpassion.at/archive/2012/08/05/initialize-a-transactional-replication-from-a-database-backup/ The only thing in this article is it uses immediate_sync to be false, where as BOL says to keep it true when allow_initilize_from_backup is true.
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • Transactional Replication sp_MSupd RUNNABLE and never ends

    Hello,
    I came across not understandable problem connecting transactional pull replication. Once or twice a month I have a problem that stored procedure on subscription server (sp_MSupd) cannot be finished. It is not blocked by any other session and does not have
    any wait type. It simply hangs and remains in task status RUNNABLE. The only one way to recover the replication is initilizing it from backup or snapshot. Do you have any suggestions. Have you faced similiar problem?

    Hi, Lydia
    Thank you for your reply. What do you mean that this is the "busy update on the publication". Could you please describe it in more details? Does it mean that on the publisher there was a huge update on a huge amount of rows? On the Publisher to
    Distributor History I can see that there is no problem. All transactions are delivered without any delays (few seconds). But in Distributor to Subscriber History I have all actions completed in few seconds except the last one that hangs. How can I check if
    it is the "busy update on the publication" problem? What should be done if it hangs more than few hours?
    I found out that sp_MSget_repl_commands hangs on Publisher for remote Subscriber. It hangs with ASYNC_NETWORK_IO
    Hi KirKuz,
    I originally mean distribution agent reader &writer latency issue, and you can use SQL profiler or DMVs to examine in detail the Transaction Replication, which is described in this
    blog.
    Regarding to ASYNC_NETWORK_IO, based on my research, it's simply waiting for something external to SQL. The drive with your distribution database might be a bottleneck of such issue, or maybe the distribution tables are getting too large. Please check your
    disk performance, also check your indexes on the replication tables for fragmentation.
    Here is a similar thread for your reference.
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/d0117651-f94c-488a-83e8-30038e38d510/transactional-replication-slow-running-spmsgetreplcommands?forum=sqlreplication
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • Transactional Replication and Database Snapshots

    Hi,
    I have a database that is a publisher in transactional replication.
    I create a database snapshot on that database and then let transactions replicate to the subscriber(s).
    I revert the database back to the snapshot.
    What happens to replication?
    Dan Jameson
    Associate Director of IT/DBA
    Children's Oncology Group
    http://www.ChildrensOncologyGroup.org

    Your Log Reader Agent could fail if the publication database LSN is less than the value of the transaction sequence number (max xact_seqno) at the distribution database.  In which case you could execute
    sp_replrestart to resynchronize the Publisher metadata with the Distributor metadata.
    Afterwards it would wise to run a data validation to see how out of sync you are with the Subscriber and use
    tablediff utility or SQL Data Compare to bring the Publisher and Subscriber back into convergence.  Reinitialization is an option as well.  It depends on exactly what you are trying to achieve.
    Brandon Williams (blog |
    linkedin)

  • At what point is it a good practice to Drop and Add back an Article for Transactional Replication?

    Hi,
    We have transactional replication Setup in our company , a set of tables involved in replication needed to be reloaded on prod say about 12-13 Million rows .
    We decided to drop the articles and add it back to replication so that a new snapshot for the specific articles can be generated and the transfer of data is fast and no breakage in the replication.
    But what is the best practice or a threshold point for taking this route i.e dropping an article and adding it back ?
    I mean 
    when Is it good to go this route  i.e when the load is more than 10, 000 rows or 50.000 rows  100,000 or at what number do we start this process?
    Thanks,
    Jack

    That is a function of horsepower and bandwidth.
    If you do drop a table out rather than replicate a 1% change of its data, 100% of the table will need to be snapshotted which might cause havoc with users trying to access that table, and if you are running immediate sync all of the tables will need to be
    resnapshotted.
    With the Enterprise Edition of SQL Server you will be able to use a sync type of database_snapshot which will mean no locking, otherwise it could be painful. Initialize from a backup is also an option to save you the cost of a snapshot.
    looking for a book on SQL Server 2008 Administration?
    http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search?
    http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941

  • Does SAP use SQL server's snapshot and transactional replication?

    Gurus:
    Could you help with this?
    Does SAP use SQL server's snapshot and transactional replication?
    Thanks!

    Hi Christy,
    no, SAP does not directly leverage these functions.
    But none the less, it is up to you to use these on your system. I regulary use the snapshot functionality when applying Support Packages. In case somehing goes wrong a snapshot is the easiest way to roll back the import process (not exactly the best choice when talking about production and users keep on working while importing).
    Have a look at this [document |http://download.microsoft.com/download/d/9/4/d948f981-926e-40fa-a026-5bfcf076d9b9/SAP_SQL2005_Best Practices.doc]. It deals with Best Practices and also covers snapshot, replication and mirroring.
    Sven

Maybe you are looking for

  • TS1424 I can no longer purchase music or books. Visa etc up to date. Downloads sign just keeps flashing but not downloading

    I have downloaded books and music for two years. Now when I try to the songs do not download. When I press green buy book it goes blank and nothing downloads. My visa is fine and details current. Also when I shut down and next day open up iTunes the

  • Encrypted drives accessible by other users

    Howdy, I am looking into encryption methods for OS X (previous post here: https://discussions.apple.com/message/22321009#22321009) and in playing around with it i found the following: If i have an encrypted drive or partition mounted on my desktop i

  • Error compiling movie. Unknown error. In both Premiere and Media Encoder

    I am trying to export a a batch of six sequences, out of Premiere Pro CC to my internal hard drive using the Apple ProRes 422 Quicktime setting. All of the sequence exports are failing in the first couple of seconds. This happens if I do them individ

  • Chart XML country settings on WAD

    Hi all, just a couple of questions about charts on WAD: - Where can i change the country configuration for charts ?, i need to change the format from 1,000 to 1.000.   I've hear about a XML related to the chart settings but i can't find it. - i'm usi

  • Embeding 3D tween

    Hi, i'm trying to embed a MovieClip (which contains 3D tween) from .swf file to AS3 project.   [Embed (source="graphics.swf", symbol="MyAnimation")]   public dynamic class MyClass extends MovieClip But it doesnt work... any ideas? Thanks!