Transactional Replication - Distribution agent not pushing some commands

We are experiencing an issue where our log reader is reading the commands and placing them into our distribution database, but when the distribution agent runs it skips certain commands (it is the same commands every time for one of our processes).
I have tried to troubleshoot the issue by running the commands manually on the subscriber, but the commands work just fine.  Also, if I pull the skipped commands out and run them separate from the set on the published database, they do end up getting
replicated.
We did add a column to the replicated table that is involved just prior to this happening.  However, we did remove the table from the articles and then place it back into the articles to reinitialize the subscription.
Any ideas? 

When you add a new column on the publisher and if you have "replicate schema changes " set to true. you should be able to see the new the column and the data on the subscriber. you do not need too drop the article and add it back and reinitialize.  Right
click on the publisher - properties - subscription options - Replicate schema changes.
I doubt if the reinitialize is waiting on the snapshot to be available. Launch replication monitor and check the if the reinitialize really applied the scripts to the subscriber.
since you removed the article , it will invalidate the current snapshot and after you add it back and reinitialized, you should generate a new snapshot . so, make sure you run the snapshot agent.
on my test here, i had to regenerate the snapshot agent since the reinitialize was waiting on the new snapshot to be available.
Hope it Helps!!

Similar Messages

  • Distribution agent not running

    Hello All,
    One distribution agent is not running continuously. The SQL job is scheduled to run when 'Start automatically when SQL Server Agent starts'. It was running fine but now the status in replication
    monitor shows Not running. I manually selected Start Synchronizing and it runs just for a few seconds and replicates transations but then goes back to Not Running status.
    Can someone please help me?
    Thanks,

    Add the -Continuous parameter to the end of your job step if it is not already there.
    Then start your agent.
    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 Not replicating non-clustered Indexes

    Hi
    I have created a transactional replication.I am sure that I have configured it to replicate Non-Clustered indexes,
    but It does not do so.
    I tried several times to reinitialize the subscription,but still no luck.
    Regards

    It is True for sure.
    But the problem is solved.I had to wait until the Initialize process get completed.
    But I am sure that this problem happened before.Sometimes it works fine but sometimes not.
    Hi ArashMasroor,
    According to your description, it seems that you encounter the issue that non-clustered indexes property is reset to “False” sometimes.
    To work around this issue, you can use a post-replication SQL script to create the indexes. Whatever articles you’re publishing open up the indexes drop down list of the article in object explorer, right-click on an index and levitate over Script Index as,
    then Create-to, then click New Query Window editor.
    Up will pop up a new query window with the resulting index. Work your way through all the indexes on all the articles of the publication, copy and pasting just the create index line and below of each script, pull them all together into one query window.
    Once you’re done find a safe folder somewhere on your hard drive and  save the SQL query as an .sql file with a sensible name. Then you can execute this script after applying the Snapshot. For more details, please review this
    blog.
    There is also a similar thread for your reference.
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/b0f3870d-1a65-4384-a17b-96825ec5f098/transactional-replication-nonclustered-indexes-not-copying?forum=sqlreplication
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • Transaction replication failing at creation of Publication

    Hi Gurus, I am facing very uncommon issue  when setting up transactional replication. My instance is running on MSSQL 2005 SP3 and same instance act as Distributor and Publisher.
    Step1: Created Distributor with no issues.
    Step2: Enable Pblisher - Same instance and a database under this instance runnning in full recovery mode.
    Step3: Create Publication - Went thru all the steps and selected couple tables(articles) to create initial snapshot. After provide a name to the publication, click ok - its throwing following error for both articles:
    TITLE: New Publication Wizard
    SQL Server Management Studio could not create article 'abc_Table'.
    ADDITIONAL INFORMATION:
    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
    The article 'abc_table ' does not exist. Changed database context to '<publisher_DB> '. (Microsoft SQL Server, Error: 20027)
    Both tables have primary key and available in publisher database. I did setup n number Transactional replications and did not see this kind of error so far. Did not see any help when googled/Binged, Any help is highly appreciated. Thanks in advance for your
    help.
    Thanks, TTeam

    Hi Mohammad, Please see the table structure it is under dbo schema.
    CREATE
    TABLE [dbo].[busmgt](
    [id] [int]
    NOT
    NULL,
    [persid] [nvarchar]
    (30)
    NULL,
    [hier_parent] [binary]
    (16)
    NULL,
    [hier_child] [binary]
    (16)
    NOT
    NULL,
    [last_mod_dt] [int]
    NULL,
    [last_mod_by] [binary]
    (16)
    NULL,
    [cost] [int]
    NULL,
    [sym] [nvarchar]
    (60)
    NOT
    NULL,
    [nx_desc] [nvarchar]
    (40)
    NULL,
    [bm_rep] [int]
    NULL,
    [ci_rel_type] [int]
    NULL,
    [tenant] [binary]
    (16)
    NULL,
    [del] [int]
    NOT
    NULL
    DEFAULT
    ('0'),
    CONSTRAINT [PK__busmgt__187915EB]
    PRIMARY
    KEY
    NONCLUSTERED
    [id]
    ASC
    WITH
    (PAD_INDEX
    =
    OFF,
    STATISTICS_NORECOMPUTE
    =
    OFF,
    IGNORE_DUP_KEY
    =
    OFF,
    ALLOW_ROW_LOCKS
    =
    ON,
    ALLOW_PAGE_LOCKS
    =
    ON)
    ON [PRIMARY]
    ON [PRIMARY]
    Thanks, TTeam

  • Running transactional replication on SQL server 2008R2 but: "The process could not connect to subscriber 'SERVER NAME'"

    I've set up Replication (transactional replication) between two remote servers. On the one of server that I configure Distribution & publication .another server is subscription. The subscription is all set & snapshot agent is started .but the actual
    replication doesn't take place.
    When viewing the Synchronization Status of the subscription, i get an error, saying "The process could not connect to Subscriber ‘Server name'."
    Clicking on start, this is the error message I get:
    The agent could not be started.
    Additional information:
    An exception while executing a Transact-SQL statement or batch.
    SQL Server Agent Error: Request to run job Server1-EDUSRV-Pubs-Server2-14 (from User Server1\Administrator) refused because the job is already running from a request by User sa.
    Change database context to 'EDUSRV'.(Microsoft SQL Server Error:22022)
    What can i do?
    Please help me.Thanks

    The error The process could not connect to Subscriber 'Server name' indicates that the Distribution Agent process account does not have enough permissions to connect to the Subscriber.
    If this is a push subscription, verify the Distribution Agent process account is db_owner in the distribution and subscription databases, is a member of the PAL, and has read permissions on the snapshot share.
    If this is a pull subscription, verify the Distribution Agent process account is db_owner in the subscription database, is a member of the PAL, and has read permissions on the snapshot share.
    The permissions required are covered in
    Replication Agent Security Model.
    If you have anymore questions, please let me know.  I hope this helps.
    Brandon Williams (blog |
    linkedin)

  • Invalid rowid error while running the snapshot agent in transactional replication

    Hi All,
    I am getting an Invalid rowid error while replicating an large tables i.e around 30 millions rows from oracle(publisher) to sql server(Subscriber) while running the snapshot agent in transactional replication.
    Its taking around 18 hours and its then its throwing this error.
    Is there any faster way that i can replicate the initial snapshot this large table as 18 hours is very high on time.
    Kindly suggest.i am always got quick and accurate response always..hope the same in this case also.
    Thanks,

    Hi,
    Could you please create a replication with some small tables for a test?
    You can disable the firewall on both sides and rerun snapshot. Enable verbose logging to level 4 for snapshot agent and check the results if it fails.
    http://support.microsoft.com/kb/312292
    Here is a document says for the error: ORA-10632: Invalid rowid Cause: Segment Highwatermark was overwritten due to shrink and space reused Action: Reissue this command.
    I also suggest you contact the Oracle support team for further help.
    Thanks.
    Tracy Cai
    TechNet Community Support

  • Transactional Replication: Alter view changes are not reflect on Subscription database

    Hi All,
    we are configured transactional replication in our environment on sql server 2008 R2 , Yesterday I made a view alter on publisher database the view also present in replicated articles but unfortunately the changes not reflect in subscription, I already have
    checked the : Replicate Schema change option in Subscription option its also true, there is not latency exist in replication monitor , i have checked the blocking on subscription and publication. one more thing I tested the changes on replicated table its
    working fine
    Please help me to fix the issue.
    Regards,
    Pawan Singh
    Thanks

    Hi Pawan,
    According to your description, the alter on the view in publication doesn't be reflected in subscription database. As my analysis, the issue could be caused by that the distribution agent job doesn’t run after altering the view.
    I make a test on my computer, and set up transactional replication to replicate tables and views. Firstly, when creating subscription, I set the distribution agent job ‘Run continuously’(as the screenshot below), and alter the view in publication database,
    then the change is successfully reflected to the corresponding view in subscription database.
    However, I also make another test with setting the distribution agent job ‘Run on demand only’(It is determined by you), and find that it is not reflected to subscription database unless I run the distribute agent job manually.
    The distribution agent is used to read the updated transactions written to the distribution database and applies the change to the subscription database, so please check if your distribution agent job runs after you alter the view. If not, please run the
    job and check if the issue still occurs.
    Regards,
    Michelle Li

  • Distribution agent could not apply a generated snapshot file

    In my case , some main info as follows . after add a article into one publication , then manually execute sp_startpublication_snapshot to generate snapshot ,and with no errors , but distribution agent didnot apply it .
    How to fix ?
    Type:Transaction Replication
    sync_method:database snapshot character
    allow_anonymous:false
    immediate_sync:false
    snapshot_in_defaultfolder:false
    alt_snapshot_folder:[new path]
    repl_freq:continuous

    Hi T.Encore,
    Besides other post, please check the Replication Monitor to see if there are any errors. And also check all logs in SQL Server agents jobs related to the publication/subscription for additional messages.
    In addition, please ensure that you perform all the steps in the following article to add articles to the existing publication.
    Add Articles to and Drop Articles from Existing Publications
    https://msdn.microsoft.com/en-us/library/ms152493.aspx
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • Transaction replication DML [update] operation not allowing

    We are configuration the transaction replication from production to DR site, while I am trying to perform the DML [update] operation in publication database, DML [update] operation not allowing.
    Note: How we can perform DML [update]  operation in publication database. 

    Hi MSDN_12345,
    According to your description, after configuring 
    SQL Server transaction replication between  two different Servers successfully. We can execute the update commands on Publisher Server. In theory, after updating the publication database, we also sync the data to the subscription database.
    For more information, see:
    http://msdn.microsoft.com/en-us/library/ms152754.aspx
    So as other post, please post more details for analysis.
    If the update command was not allowed to perform, we need to verify if your account has the related permission on the publication table, such as update permission, select permission and so on. Usually, the members of the sysadmin fixed server
    role, the db_owner and db_datawriter fixed database roles, have update permissions.
    Regards,
     Sofiya Li
    Sofiya Li
    TechNet Community Support

  • 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.

  • How the transactional replication work for simple recovery database (looking for some internal concept)

    How the transactional replication work for simple recovery database (looking for some internal concept)
    Rahul

    There seems to be a new myth going around recently. I’ve had at least three people tell me, in the last month, that SQL’s transactional replication requires the database to be in full recovery.
    This is complete fabrication. Replication (SQL native replication, that is) can work with the databases in any of the recovery models.
    Transactional replication does involve the transaction log, as that’s where it picks up changes from. The log reader scans over the transaction log looking for log records marked for replication, copies those to the distribution database and then marks them
    as replicated. When the checkpoint (for simple recovery) or log backup (for full or bulk logged) occur, the log will only be truncated up to the oldest inactive, replicated transaction.
    Because transactional replication has its own way of ensuring log records aren’t discarded before been picked up by the log reader, there’s no requirement for a specific recovery model.
    Refer this link
    http://sqlinthewild.co.za/index.php/2008/12/05/a-new-sql-myth/
    --Prashanth

  • Some commands are not working nor in illustrator nor photoshop, any advice better than Adobe?

    Illustrator is not fuctioning at 100%, some commands do not work ( eg - command open, nor place etc ) and same with photoshop....
    Any advice

    pcmyhre,
    You may try the list, possibly starting with item 7) in 5), which is a list of the usual suspects, which may disturb and confuse Illy so she fails to do even simple things.
    The following is a general list of things you may try when the issue is not in a specific file, and when it is not caused by issues with opening a file from external media, see below. You may have tried/done some of them already; 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    If possible/applicable, you should save current artwork first, of course.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to at least 5 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible);
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall, run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html
    External media: It is always recommended here to open/save from/to own hard disk, and to copy from/to networks and removable media. You may be lucky (for a while), but the chances of file corruption and other unpleasantnesses are immensely greater when you use anything but the harddisk, and it is better to be safe than sorry.
    In addition to the (far greater) risk of file corruption, some issues are mentioned here:
    http://helpx.adobe.com/illustrator/kb/illustrator-support-networks-removable-media.html

  • I have noticed that Safari does not support some HTML commands on apple operating systems. Can anyone help with this issue please?

    I have noticed that Safari does not support some HTML commands on this operating platform. Can anybody throw any light on this issue please?

    Examples.

  • Need to figure out how to remove an unknown admin password on a mac.  used the install disc with not luck. tried some commands in single user mode, no luck.

    need to figure out how to remove an unknown admin password on a mac.
    used the install disc with not luck. tried some commands in single user mode, no luck.

    need to figure out how to remove an unknown admin password on a mac.
    used the install disc with not luck. tried some commands in single user mode, no luck.

  • Transactional Replication - Not replicating

    Hello, 
    I've recently set up transactional replication from one database in Server 1 to another database in server 2. 
    I've checked the Replication Monitor and they stay green with Latency 0.02 sec and not showing any issues. 
    However when I inserted a row on the database on Server 1 and waiting 1 minute it's not replicating on Server 2 database. 
    Could anyone advise what and where to check for issues?
    Best regards, 
    Mohan

    What is the latency now? Does it show higher latency?
    Could you confirm if the table in which you inserted the row is part of replication?
    Could you also try inserting a "tracer token" and see if it replicates and how much time it takes?
    http://technet.microsoft.com/en-us/library/ms151846(v=sql.105).aspx
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

Maybe you are looking for

  • Function Module to send a mail in PDF/ XLS format

    Can you please tell me the name of a function module where a mail to be send in a non-sap box. And then mail which will be send is in a PDF/ XLS format. Regards, Subhasish

  • My CS3 works fine but..

    I recently purchased a full edition of Photoshop CS3 extended and run it on Vista. Soon I hope to receive the free upgrade to CS4. CS3 works fine except that whenever I close the program I get a message saying that Photoshop CS3 has stopped working a

  • ACS 4.1.1

    Hi There, After a lot of java updates our ACE 4.1.1  server does not render pages correctly locally on the server. The fix we have found to be  is to roll back all the java updates to a much older version. In light of the security concerns of java, i

  • [solved] emacs daemon systemd unit doesn't start

    I found instructions on EmacsWiki for a systemd service file for running the emacs daemon at startup.  It works just fine on my desktop, but for some reason it doesn't work on my laptop.  Here's the service file (/etc/systemd/system/[email protected]):

  • Query on Sales Document Condition (2LIS_11_VAKON)

    Hello Gurus, I want to report on sales order conditions. Hence I have used 2LIS_11_VAKON. But I m unable to find KNUMV(Number of the document condition) and KPOSN(Condition item number) in the datasource. Because of this my records "transfered" and "