Transactional replication with 1 publisher 2 subscribers in SQL 2012 SE

I have a setup of transaction replication between one publisher and subscriber in the Same server.Now, I need to add a new subscriber to the existing publisher. So publisher database name is DB_A and Subscriber 1 name is DB_B. So the new subscriber will
be DB_C. 
Is this kind of setup possible on one server?
If yes then at the time of reinitialization is it going to apply the snapshot on DB_B as well as DB_C?
Also let say if due to disk error DB_B gets corrupted then will data be still replicated between DB_A and DB_C? (Assuming publisher, subscriber 1 and 2 are sitting on individual disks)
Need your valuable thoughts experts.
Thanks a ton.

For that you have to setup replication with backups. Assuming you had a failure and the only option now is to reinitialize, then instead you basically drop the subscription, change the publication property to
allow_initialize_from_backup to true. Now you can follow the article below to create the subscription. Instead of using the backup from publisher you can use the old backup of subscriber. In this case, you need to confirm that
all the data that is in the publisher (which needs to be replicated) is already there in subscriber.
http://msdn.microsoft.com/en-us/library/ms147834.aspx
Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

Similar Messages

  • SQL Server 2012 Transactional Replication with updateable subscriptioins

    Hi All,
    It is heard that Transactional Replication with Updateable Subscriptions
    is
    deprecated in SQL 2012 so it is not possible to configure through the wizards but
    we can still configure it by using T-SQL Script. Would you please share that script if possible to configure the same in SQL Server 2012. Thank You.
    Regards,
    Kalyan
    ----Learners Curiosity Never Ends----

    Thanks for the information,
    I understand that you have got the answer yourself and post it, Therefor I mark your answer. If this is still open question please inform us.
    [Personal Site] [Blog] [Facebook]

  • Noncovergence in transactional replication with updatable subscription

    Hello all, 
    I have a Transactional replication with updatable subscription setup having 1 publisher and 3 subscribers. All the servers are SQL 2008 and have conflict resolution
    policy set as subscriber wins. Of late, I have been observing data mismatch for few tables. Some tables have records but their column values doesn't match. Some records are there on one subscriber but missing on publisher and other subscribers. However replication
    is running fine without any issue. I am trying to understand what could have caused this issue and how it could be avoided in future. 
    Do you guys have any idea what might be causing this and how to fix this?
    Let me know if you need any further details. 
    FYI: There is no filter defined for any articles in replication.
    Thanks, 
    Nainesh.

    If these problem rows do not show up as conflicts you will need to create audit tables and triggers to determine why these rows are not being picked up for replication.
    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

  • 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

  • Cannot see Transaction replication with updatable subscription in new publication wizard-sqlserver 2005 standard edition

    Folks,
    I am planning to implement transactional replication with updatable subscription between two sql2005 Instance .I am surprised that i cold see this type of replication in the new publication wizard in the source server instead i see peer-to-peer replication.
    Could you please help me in understanding how to setup  transactional replication with updatable subscription in sqlserver 2005 standard edition.
    Thanks.

    Hi soories,
    In addition to Ashwin’s post, peer-to-peer replication is available only in SQL Server 2005 Enterprise Edition. Please
    execute ‘Select @@version’ in SQL Server to verify the version and edition of your SQL Server instance.
    Also if you cannot see the option “Transaction replication with updatable subscription” in New Publication Wizard, you can use T-SQL to achieve this requirement.
    How to: Create an Updatable Subscription to a Transactional Publication (Replication Transact-SQL Programming)
    https://technet.microsoft.com/en-us/library/ms146922(v=sql.90).aspx
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • Issue with SSIS Custom Components - 64 bit SQL 2012

    Hello All,
    Our SSIS packages built on SQL 2008 R2 make use of some custom components. These custom components are installed as part of an MSI. The dll's are copied over to the Windows/assemble [GAC Folder] and also to the Program Files(x86)/SQL Server/110/DTS/* folder.
    The installation does not copy the dll's to the 64 bit program files folder.
    X:\Program Files\Microsoft SQL Server\110\DTS
    These packages are executed via SQL Agent jobs on a 64 bit SQL server and there does not seem be any issue.
    Now we are upgrading our servers to SQL 2012 and we have a new installer for the custom components as well. The new custom components use .NET Framework 4.0 and when installed the dll files get copied over to the Ms.NET 32 bit runtime GAC folder and also
    to the SQL Server DTS Folder in x86. The upgraded packages work only when we set the runtime mode to 32 bit. The packages successfully executes within the 32 bit dtexec utility, but when we try to run the same package using a 64 bit dtexec utility the
    process errors out with a component failed to load message. The package moves data between two SQL Server instances.
    The custom components have always been built for 32 bit runtime. I can run a older package through the dtexec utility (from the 64 bit folder in program files) and it does work without any issues. After the upgrade the package will only execute on
    a 32 bit utility. can someone help me understand this issue?
    Regards, Dinesh

    Thank you Arthur.
    i think we got the answer as well, as the .NET framework 3.0 installer copied the files over to the C:\windows assembly the dtexec utility [32 bit/64 bit] was able to load the components.
    Now with the new installer the files are copied to specific runtime gac folders as Arthur has mentioned. The 64  bit  utility does not find the dlls in the GAC whereas the 32 bit version will find them.
    Regards, Dinesh

  • Transactional Replication

    Please help me..
    After configuring Transactional Replication with  a publisher, distributor , subscriber and with one database and one table . and in subscriber the database in read write mode. so, we can perform changes .   Here my question is....
    we performed some changes in table (other than primary key column) in subscriber db.  
    Then both db's have different vales ( publisher db and subscriber db). how will face this scenario? 

    Hi,
    As Hilary said, if you make changes in the publisher database, the data which you changed on the same row in the subscriber database will be replaced.
    Do you want to synchronize the changes between subscriber and publisher in both directions? If so, you need to Merge replication.
    Merge replication, like transactional replication, typically starts with a snapshot of the publication database objects and data. Subsequent data changes and schema modifications made at the Publisher and Subscribers are tracked with triggers.
    The Subscriber synchronizes with the Publisher when connected to the network and exchanges all rows that have changed between the Publisher and Subscriber since the last time synchronization occurred.
    Thanks.
    Tracy Cai
    TechNet Community Support

  • Transactional Replication - Slow running sp_MSget_repl_commands

    We are running transaction replication, with a publisher and a single subscriber located in different data centres. The distribution database is located with the subsciber.
    We get high replication latency regularly, and during those times I have identified the bottleneck as the execution of sp_MSget_repl_commands by the distribution reader. Monitoring this thread in the DMV dm_exec_requests, it is consistently getting long waits
    for wait_type ASYNC_NETWORK_IO.
    Why would distribution reader by waiting on network? The thread and distribution database are all located on the same server. Is there something else that the distribution reader thread does that requires accessing the publisher?

    Do you have a remote distributor?
    Expect the ASYNC_NETWORK_IO wait type when the distribution agent is replicating over a wan/lan. Pull subscriptions may work better.
    However, you need to determine what your latency is. If your replication latency is high, server minutes, or something which does not work for you - you have a problem. Otherwise it is just an inherent limit you can't do much about.
    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

  • Transactional replication issue

    Hi,
    i have configured transactional replication with separate distributor server, the data copied and snapshot delivered,last 2days it is running, publisher to distributor is good, but distributor to subscriber it show heavy latency and it is showing critical
    status,when i see in the replication monitor, it shows undistributed commands 65000 records, when i see in snchronization status it showing 'deliverimg replication', when i compare to publisher and subscriber records difference is there, i checked the file
    tranfer speed 100mbps and bandwidth speed is als good....how to fix it

    Was there any issue which caused replication to stop for some time or was there any huge updates that happened at publisher..
    Take a look at this link..
    http://blogs.msdn.com/b/chrissk/archive/2009/05/25/transactional-replication-conversations.aspx
    It explains very clearly to troubleshoot this.. You might only have to look at the distribution agent latency part, as per your description...
    Apart from this, check if there are any triggers in the subscriber end which is making the subscriber updates slow..
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • Transactional replication triggers disabled after server restart

    Hello Everyone,
    I have been facing this issue since couple of days. I have configured transactional replication with updatable subscriber in sql server 2008 R2.  It was working fine till date. Recently we are facing an issue where subscriber whenever restarts, one
    of the table's replication triggers(insert, update and delete) are disabled automatically. We have to manually enable all the triggers for that table. Other tables are working fine. Please help. Thanks in advance.
    Regards,
    Sai

    Have you checked information from replication monitor?
    You should disable all triggers because you don't want SQL Server to fire the trigger on the Subscriber database when the database receives an insert, update, or delete operation. Because the trigger has already fired on the Publisher database, firing the trigger
    on the Subscriber database might repeat the transaction.
    http://technet.microsoft.com/en-us/library/ms151718(v=sql.110).aspx
    http://msdn.microsoft.com/en-us/library/ms152529.aspx

  • SQL Server Replication with MYSQL DB on web

    Hi Friends,
    I want to inquire that using sqlserver 2012 we can configure transactional replication between MYSQL DB on web to sqlserver 2012. Tables will be residing on MYSQL DB web to SQLSERVER 2012. using sqlserver replication as option (publisher and subscriber)
    thank you.
    regards,
    asad
    asad

    Hi Asad,
    I suspect you want the replication done using a SSIS package, this is why you posted your question here.
    I then need to disappoint you, neither SSIS nor anything in the standard SQL Server distribution exists that will make this happen.
    In the field the devs typically use 3rd party tools, or write a lot of custom code which results in a custom tailored application
    Thread https://social.msdn.microsoft.com/Forums/sqlserver/en-US/fbfeb2a8-9875-4590-b367-018bb7777b3c/is-it-possible-to-set-up-a-replication-between-sql-server-2008r2-and-mysql-v4?forum=transactsql has many such options listed.
    Arthur
    MyBlog
    Twitter

  • Linked Server : SQL 2012 to 2000 error - Microsoft Distributed Transaction Coordinator (MS DTC) has stopped this transaction.

    Hi all,
      If any one has worked around this error and can help ?
    Msg 8522, Level 16, State 3, Line 1
    Microsoft Distributed Transaction Coordinator (MS DTC) has stopped this transaction.
      I am trying to connect from sql 2012 to 2000 server. Established linked server using native client 10. I am able to see catalogs and database and table. Just when I am trying to query i am getting above error. 
    any help is really appreciated. 
    Thanks
    Please Mark As Answer if it is helpful. \\Aim To Inspire Rather to Teach

    Hi Logicinisde,
    What the new error message do you get after using the workarounds in this
    blog? Please post it for analysis.
    Besides, as SQL Server 2012 has stopped connecting to SQL Server 2000 via linked servers, personally I recommend you upgrade SQL Server 2000 to a higher version to make your queries or ETLs efficient.
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • SQL 2012 Transactional Replication Publisher is also AG Primary, AG fine, but Replication status continuously 'waiting for next Log backup'

    Hi,
    I have a SQL 2012 instance that hosts 3 databases that are publishers in (push) transactional replication to subscribers in other domains and are also primary in an Availability Group to other instances in the same domain.  The AG is healty (synchronized),
    and replication is ok for 2 databases, but the third continuously shows the Publisher to Distributor history status as 'Replicated transactions are waiting for next Log backup or for mirroring to catch up.'
    I have weekly full, nightly differential, and hourly log.  Those are running and I've tested restoring the publisher db from them into a test instance.  The option for sync_with_backup is 0.  I generated a new snapshot, no change (haven't
    reinitialized, that will be last possible option as this is production).  When the log backups run, status will briefly change to 'Approximately (x) log records have been scanned in pass # ..., 0 of which were marked for replication' and some data
    does replicate, but then status immediately changes back to the message about waiting for log backup.   We are only replicating tables (no views, sp's, etc).  All subscribers and AG secondaries are SQL 2012.  My db is less than 200
    GB data. 
    The jobs are continuously running and data updates are occurring on the primary.  The distribution database is on the same instance as the publishers.  Anyone have any ideas what could be happening? 
    Thanks greatly!

    Update - I resolved this. 
    We had added a new asynchronous instance to the AG, but hadn't added the databases on the new node to the AG yet.  Conceptually it seems that adding the instance must have marked the logs and interferred with transactional replication on the
    primary.  Once I added the databases to the AG on the secondary, then the replication status cleared on the primary and has remained cleared.  It is odd though that it only impacted one of the databases in the AG. 
    cheers. 

  • Transactional replication very slow with indexes on Subscriber table

    I have setup Transactional Replication for one of our databases where one table with about 5mln records is replicated to a Subsriber database. With every replication about 500-600.000 changed records are send to the Subscriber.
    Since one month I see very strange behaviour when I add about 10 indexes to the Subscriber table. As soon as I have added the indexes replication speed becomes extremely slow (almost 3 hours for 600k records). As soon as I remove the indexes the replication
    is again very fast, about 3 minutes for the same amount of records.
    I've searched a lot on the internet to solve this issue but can't find any explaination for this strange behaviour after adding the indexes. As far as I know it doesn't have to be a problem to add indexes to a Subscriber table, and it hasn't been before on
    another replication configuration we use.
    Some information from the Replication Log:
    With indexes on the Subscriber table
    Total Run Time (ms) : 9589938 Total Work Time : 9586782
    Total Num Trans : 3 Num Trans/Sec : 0.00
    Total Num Cmds : 616245 Num Cmds/Sec : 64.28
    Total Idle Time : 0 
    Writer Thread Stats
    Total Number of Retries : 0 
    Time Spent on Exec : 9580752 
    Time Spent on Commits (ms): 2687 Commits/Sec : 0.00
    Time to Apply Cmds (ms) : 9586782 Cmds/Sec : 64.28
    Time Cmd Queue Empty (ms) : 5499 Empty Q Waits > 10ms: 172
    Total Time Request Blk(ms): 5499 
    P2P Work Time (ms) : 0 P2P Cmds Skipped : 0
    Reader Thread Stats
    Calls to Retrieve Cmds : 2 
    Time to Retrieve Cmds (ms): 10378 Cmds/Sec : 59379.94
    Time Cmd Queue Full (ms) : 9577919 Full Q Waits > 10ms : 6072
    Without indexes on the Subscriber table
    Total Run Time (ms) : 89282 Total Work Time : 88891
    Total Num Trans : 3 Num Trans/Sec : 0.03
    Total Num Cmds : 437324 Num Cmds/Sec : 4919.78
    Total Idle Time : 0 
    Writer Thread Stats
    Total Number of Retries : 0 
    Time Spent on Exec : 86298 
    Time Spent on Commits (ms): 282 Commits/Sec : 0.03
    Time to Apply Cmds (ms) : 88891 Cmds/Sec : 4919.78
    Time Cmd Queue Empty (ms) : 1827 Empty Q Waits > 10ms: 113
    Total Time Request Blk(ms): 1827 
    P2P Work Time (ms) : 0 P2P Cmds Skipped : 0
    Reader Thread Stats
    Calls to Retrieve Cmds : 2 
    Time to Retrieve Cmds (ms): 2812 Cmds/Sec : 155520.63
    Time Cmd Queue Full (ms) : 86032 Full Q Waits > 10ms : 4026
    Can someone please help me with this issue? Any ideas? 
    Pim 

    Hi Megens:
    Insert statement might be slow with not only indexes and few others things too
    0) SQL DB Blocking during inserts
    1) If any insert triggers are existed
    2) Constraints - if any
    3) Index fragmentation
    4) Page splits / fill factor
    Without indexes inserts will be fast because, each time when new row going to insert to the table, SQL Server will do
    1) it will check for the room, if no room page splits will happen and record will placed at right place
    2) Once the record updated all the index should be update
    3) all these extra update work will cause can make insert statement bit slow
    Its better to have index maintenance jobs frequently to avoid fragmentation.
    If every thing is clear on SQL Server Side, you need look up on DISK IO, N/W Latency between the servers and so on
    Thanks,
    Thanks, Satish Kumar. Please mark as this post as answered if my anser helps you to resolves your issue :)

  • Unable to drop publication database from publisher server in transactional replication

    Dear All,
    we are getting one issue when the time of dropping publication database on publisher server in transactional replication in sql server 2008 r2.
    TITLE: Microsoft SQL Server Management Studio
    Could not delete publication 'dbname_Pubs'.
    For help, click:
    http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600.1&EvtSrc=Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.Replication.ReplicationMenuItem&EvtID=CantDeletePublication&LinkId=20476
    ADDITIONAL INFORMATION:
    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
    Could not find stored procedure ''. (Microsoft SQL Server, Error: 2812)
    For help, click:
    http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.4000&EvtSrc=MSSQLServer&EvtID=2812&LinkId=20476
    BUTTONS:
    OK
    mastanvali shaik

    try this..
    exec sp_removedbreplication N'<dbname>'
    exec sp_droppublication @publication = N'<dbname>'
    Raju Rasagounder Sr MSSQL DBA

Maybe you are looking for

  • Deploying seam application on weblogic 10.3.2 application server.

    Hi All, I deployed jsf1.2.war file into weblogic. Now when I tried to run seam application getting below errors Apr 6, 2010 11:00:29 AM com.sun.faces.config.ConfigureListener contextInitialized INFO: Initializing Sun's JavaServer Faces implementation

  • ITunes show Airport Express Speakers but will not allow me to choose them

    Hi, I just installed and updated my 802.11g airport express. When I open iTunes (version 9- just updated today), I am able to see the speaker selector option on the bottom right of the screen. When I open it, the choice for my laptop speakers and air

  • Date Conversion Through User Defined Function

    hi, I am trying to convert the SAP Date format i.e. yyyymmdd to dd/mm/yyyy date format by using a custom Function. the code is.: public String ConvertDate(String dateSAP,Container container){ String inputdate= dateSAP; int month=Integer.parseInt(inpu

  • Problem with TNSNAMES.ORA (urgent)

    Dear Freinds, I am trying to run my Forms(6i) on the Form server , but as I try to login to the database to run the form I am getting an error 'ora-12154 : TNS could not resolve the service names' . I have checked the local TNSNAMES.ORA file and it h

  • Combine multipe tables (with same schema) in one MeasureGroup?

    With tables "FactsHistory" and "FactsToday" in the DWH (identical schema), how would one load a data union into the cube? We were planning to use one partition per table (one MOLAP, one ROLAP) and though it is probably easy to use then in one logical