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

Similar Messages

  • 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

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

  • 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

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

  • Snapshot Error When Adding Article to Transactional Replication

    I am trying to add an table articles to my transactional replication setup.   When I do, the snapshot error fails with the following message:
    Source: Microsoft.SqlServer.Smo
    Target Site: Microsoft.SqlServer.Management.Smo.SqlSmoObject GetSmoObject(Microsoft.SqlServer.Management.Sdk.Sfc.Urn)
    Message: Attempt to retrieve data for object failed for Server '<servername>'.
    Stack:    at Microsoft.SqlServer.Management.Smo.Server.GetSmoObject(Urn urn)
       at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.BuildSmoObjectArrayAndUrnLookupTable(IDictionary& dictUrnKeyArticleScriptingBundles)
       at Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.DoScripting()
       at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.DoScripting()
       at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.GenerateSnapshot()
       at Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun()
       at Microsoft.SqlServer.Replication.AgentCore.Run() (Source: Microsoft.SqlServer.Smo, Error number: 0)
    Get help: http://help/0
    Source: Microsoft.SqlServer.Smo
    Target Site: Microsoft.SqlServer.Management.Smo.ObjectKeyBase CreateKeyFromUrn(Microsoft.SqlServer.Management.Sdk.Sfc.Urn)
    Message: The input Urn must specify Name at level UserDefinedFunction.
    Stack:    at Microsoft.SqlServer.Management.Smo.SchemaCollectionBase.CreateKeyFromUrn(Urn urn)
       at Microsoft.SqlServer.Management.Smo.Server.GetSmoObjectRec(Urn urn)
       at Microsoft.SqlServer.Management.Smo.Server.GetSmoObject(Urn urn) (Source: Microsoft.SqlServer.Smo, Error number: 0)
    Get help: http://help/0
    Specifics:
    Transactional replication:  Both Immediate Sync and Allow Anonymous are set to 0.
    Publisher and Distributer are same server:  SQL Server Standard 2008 R2 (10.50.4000.0) on Windows 2008 R2 SP1
    If I add even one table article (doesn't matter, I've tried different ones), I get the error above when I run the snapshot agent.
    If I remove the table just added and rerun the snapshot agent, it succeeds with the message "A snapshot was not generated because no subscriptions needed initialization", so at least I don't have to reinitialize (thank goodness!).
    Any ideas as to what might be causing this, and how I can add articles to my existing publication?
    Thanks in advance for your help.

    Hi John V.Barone,
    I’m writing to follow up with you on this post. Was the problem resolved after performing our action plan steps? If not, according to your error message, we need to verify if it is caused by replicating Meta Data corruption. You can check if there is a bad
    row
    in “sysarticles” (for a table) or “sysschemaarticles” (for a UDF) for which we do not have a corresponding “ObjectId” in sysobjects . If yes, delete
    manually  this row
    from Published (sysarticles, sysschemaarticles, syssubscriptions) and Distribution DB (MSsubscriptions,sysschemaarticles,MSarticles).
    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.

  • 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

  • Error while setting up Transactional Replication

    Hi Team,
    I am getting below error while configuring Transactional Replication.
    Specifically, when I started configuring the distributor that when I am getting below error. I am getting this in GUI as well TSQL script as well.
    SQL Server could not configure 'TEST-PC\SQL2K8' as a Distributor.
    ADDITIONAL INFORMATION:
    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
    Destination path D:\SQL2K8DATA is not valid. Unable to list directory contents. Specify a valid destination path.
    Changed database context to 'master'. (Microsoft SQL Server, Error: 14430)
    Background of the error.
    ========================
    I installed 3 sql instances of "SQL Server 2008 Developer edition, SP3 (x64)".
    I started configuring a remote distributor using one of the instance and error started popping up.
    Initially I had the replication running fine and I removed it and tried to reconfigure distributor thats when the error starting popping up.
    The folder physically exists and the service account has full permissions and I have logged in as service account and trying to setup Transactional Replication.
    He is local administrator on the box and also sysadmin login at sql server level.
    Not sure why this error is popping up.....
    After wasting a lot of time. I tried to install 3 new fresh instances with same service pack level i.e. sp3, but still the error remains the same.
    Appreciate if anyone can guide me resolving this issue.
    Thank you.

    Hi Brandon,
    I generated the script and tried again. No Luck. It is throwing error at creation of distribution database itself i.e. exec sp_adddistributiondb .
    /****** Scripting replication configuration. Script Date: 2/25/2014 11:43:31 AM ******/
    /****** Please Note: For security reasons, all password parameters were scripted with either NULL or an empty string. ******/
    /****** Installing the server as a Distributor. Script Date: 2/25/2014 11:43:31 AM ******/
    use master
    go
    exec sp_adddistributor
    @distributor = N'TEST-PC\S2',
    @password = N'123'
    GO
    exec sp_adddistributiondb
    @database = N'distribution',
    @data_folder = N'C:\Program Files\Microsoft SQL Server\MSSQL10.S2\MSSQL\Data',
    @log_folder = N'C:\Program Files\Microsoft SQL Server\MSSQL10.S2\MSSQL\Data',
    @log_file_size = 2,
    @min_distretention = 0,
    @max_distretention = 72,
    @history_retention = 48,
    @security_mode = 1
    GO
    Error Message :
    Msg 14430, Level 16, State 1, Procedure sp_adddistributiondb, Line 227
    Destination path C:\Program Files\Microsoft SQL Server\MSSQL10.S2\MSSQL\Data is not valid. Unable to list directory contents. Specify a valid destination path.
    use [distribution]
    if (not exists (select * from sysobjects where name = 'UIProperties' and type = 'U '))
        create table UIProperties(id int)
    if (exists (select * from ::fn_listextendedproperty('SnapshotFolder', 'user', 'dbo', 'table', 'UIProperties', null, null)))
        EXEC sp_updateextendedproperty N'SnapshotFolder', N'\\TEST-PC\repldata', 'user', dbo, 'table', 'UIProperties'
    else
        EXEC sp_addextendedproperty N'SnapshotFolder', N'\\TEST-PC\repldata', 'user', dbo, 'table', 'UIProperties'
    GO
    exec sp_adddistpublisher @publisher = N'TEST-pc\s1',
    @distribution_db = N'distribution',
    @security_mode = 1,
    @working_directory = N'\\TEST-PC\repldata',
    @trusted = N'false',
    @thirdparty_flag = 0,
    @publisher_type = N'MSSQLSERVER'
    GO

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

  • Transactional replication from a failover cluster instance to a SQL Server Express DB

    Hello,
    I have been poking around on Google trying to understand if there are any gotchas in configuring transactional replication on a instance DB of a failover cluster, to a SQL Server Express DB. Also, this client would like to replicate a set of tables between
    two instances DB's which both reside on nodes of the cluster.
    Everything I've read suggests there is no problem using transactional replication on clustered instance as long as you use a shared snapshot folder. I still have some concerns:
    1) Should the distributor need to live on a separate instance?
    2) What happens in the event of an automatic, or manual failover of a publisher, especially if the distributor does not need to live on a separate instance? I know that when a failover occurs, all jobs in progress are stopped and this seems like a recipe for
    inconsistency between the publisher and subscriber.
    There is a paramount concern, that this particular client won't have staff on hand to troubleshoot replication if there are problems, hence my hesitancy to implement a solution that relies on it.
    Thanks in advance.

    1) Should the distributor need to live on a separate instance?
    Answer: It is recommended to configure the distributor on the different server, but it also be configured on Publisher/subscriber server. (Subscriber in our case is not possible as its a Express edition)
    2) What happens in the event of an automatic, or manual failover of a publisher, especially if the distributor does not need to live on a separate instance? I know that when a failover occurs, all jobs in progress are stopped and this seems like a recipe for
    inconsistency between the publisher and subscriber. There is a paramount concern, that this particular client won't have staff on hand to troubleshoot replication if there are problems, hence my hesitancy to implement a solution that relies on it.
    Answer: If you configure both publisher and distributor on the same server and the SQL instance is failed over, the data synchronization/replication is suspended till the instance comes online. 
    Once the instance is up,all the replication jobs will start again and it will continue to synchronize the data to subscriber. No manual intervention is required.

  • 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

  • Trans. Replication failing -- "Cannot update identity column ..." -- unable to use sp_browsereplcmds to view statement

    All, I'm trying fix an issue with transactional replication where replication monitor is showing the push to the subscriber is failing because of the error, "Cannot update identity column."  I've tried to use sp_browsereplcmds to pull up the
    command that's failing based on the xact_seqno but when I try that I get the error:
    Number: 102, State: 1, Procedure: , LineNumber: 0, Server: , Source: .Net SqlClient Data Provider
    Message: Incorrect syntax near '┻'.
    I'd like to fix the issue without having to rebuild replication during a maintenance window.  I know you cannot publish tables with primary keys, but I'm wondering if dropping the identity column on this table might fix the issue.  I'm considering
    that but I would prefer to be able to pull the command that's trying to update the identity column, throw in SET IDENTITY_INSERT ON and remove the commands from the distribution database, but if that doesn't work I'm open to ideas of just dropping the primary
    key on the replicated table.  I think that should be fine.
    Does anyone have any recommendations on how to view the command that's failing?
    Or if dropping the primary key on the subscriber table would create issues with the publisher (since it is also the primary key)?
    Or, know of any other ways in which to address this issue?  Thanks.

    Unfortunately, no.  The error was a bit of a red herring.  In the end the subscriber was missing all of the stored procedures needed to update data in the published tables (i.e., the procedures for performing inserts/updates/deletes were missing
    for every table in the subscriber database).  Additionally, I could not recreate these stored procedures using sp_scriptpublicationcustomprocs
    because another procedure which was required for that proc to work was also missing. In short, there were hundreds of missing stored procedures in the subscriber database on which transactional replication is dependent in order to replicate DML changes and
    function normally and this includes system sprocs which would've been used to recreate the missing DML procs. In short, the subscriber was badly damaged and deemed to be unrecoverable within a reasonable time frame.
    The solution was to tear down and start over, which we did successfully later in the evening. 

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

Maybe you are looking for

  • Automatic creation of source lists on contract creation

    Hi, Is there anyway to automatically generate a source list when a contract is created for the each line in the contract?  I know that you can go to Item -> Maintain source list, but the business is reluctant to accept this solution since it is an ex

  • The problem with the return code of JOptionPane

    I debug the follow code, when I press button No, return code is 0, but OpenXLSFile(ResultXSLName); executed, why? the result is whether I press YES or NO, the if condition will be true how to compare the return code?           int open = JOptionPane.

  • Missing Resource & Configuration Tab

    I just installed indentity manager and trying to follow admin guide to pick it up. I dont see Resource or Configuration tabs as shown in the guide. I need to configure a resource adapter to sun directory and test it. I followed everything in insall d

  • Aperture and Automator.

    I have a web gallery (http://traceramc.co.uk/japan/viewerDynamic.php?id=CRW_1860.jpg&gallery=Meiji%20S hrine) created using php and mysql that allows people to leave comments on each of my photos - I upload images and thumbnails to a webserver and th

  • DVD player hangs when I insert blank DVD

    When I insert a DVD into my Mac Pro, the DVD recorder/player stops working!! I have to reboot my machine and it starts working OK. This is happening more and more often. Any Idea why and how to solve the problem?