Are you the publisher? Claim or contact us about this channel

Embed this content in your HTML


Report adult content:

click to rate:

Account: (login)

More Channels


Channel Catalog

Channel Description:

Discussions on SQL Server Replication

older | 1 | .... | 31 | 32 | (Page 33) | 34 | 35 | .... | 181 | newer

    0 0

    Oracle to sql server replication set up sql 2012. suddenly it started lagging.log reader agent said. batch process in progress.xx no.of commands..0 goes on increasing for hours ..but no updates yet.

    0 0

    I am in
    the process of creating replication between 2 remote servers, server 1 is the
    distributor and publisher and server 2 is the subscription

    server 1
    windows 2003 server connected by vpn
    SQL 2005

    server 2
    windows 2003 server connected by vpn
    SQL 2005

    when i setup up the replication all looked fine until i looked at the sync
    status and is said

    The Agent could not be started
    an exception occurred while executing a transact-sql statement or batch
    sqlserveragent error request to run job
    server1-username blah blah blah

    from user sa refused because the job is already running from a request by user
    sa changed database context to technical error 22022

    I can't seem to locate what the problem is any help would be much appreciated

    I have cleared jobs in the server agent as well just to make sure but still
    nothing <o:p></o:p>

    Could this
    be something to do with authentication between two non trusted domains as I can
    browse and even control each sql server via SQL studio but just not setup

    0 0

    Hi all,

    i have two server:-ERPSERVER under .in domain and SFNDATA under .com domain.

    i created publisher on ERPSERVER and it is publishing successfully all data in alternate shared folder. Then i created pull subscriber on SFNDATA Server but it is not updating data from the alternate shared folder. And administrator of SFNDATA server have full access in security and sharing tab of this folder.

    But it is showing Error "The process could not find file due to OS error 5" on Distributor to Subscriber history tab of Replication Monitor of Publisher.

    I am using user sa of ERPSERVER for Distributor Connection on subscription properties. Pls tell me where i am doing wrong i will be very thankfulll to you.


    0 0


    I set up replication on our servers at work to streamline some procedures we run daily/weekly on them.

    This copies around 15 articles from two databases on the "Master" server to another server used for execution purposes. For the most part it was a pretty straight forward task and it seemed to work nicely; but I realised after some investigation that the non-clustered indexes weren't copying over to the child server.

    I set the non-clustered indexes property in the properties of the publishing articles to "True" and generated a new snapshot, this seemed to work, but I've come into work this morning to find the property has reset to "False" and I have no indexes on the table again. Why is this happening and is there any way I can resolve the matter so the indexes are copied over concurrently?

    Thanks in advance for your advice.


    0 0

     We are currently looking at replicating our primary database(SQL Server 2008 R2) to a read only secondary database (SQL Server 2008 R2). The aim is to achieve a real time data replication for a BI application that reads from the secondary. The difficulty is there are some truncate operations that execute on primary. while the truncate operation is executing there will a set of new tables created on the same database. This operation can happen any number of times in a day. We cannot use transaction replication as there are no primary keys on many of tables. Please let me know if you have any suggestions on achieving this.


    0 0

    I have p2p setup in our environment, with schema options set to not replication foreign keys or defaults to other subscribers. I've found that regardless of the schema option set, these objects still get recreated on the rest of the peers. I cant find any documentation that says p2p replication ignores certain schema options.

    Has anyone else experienced this or know of a workaround?

    0 0

    Where can I adjust the snapshot file expiration time? I would like to be able to reuse my snapshot files after 10 days for example. If I stop Merge replication for 5 days, I would like to be able to start Merge Replication without having to regenerate snapshot files and block users while doing so.

    What setting forces Replication to declare snapshot files obsolete?

    Thank you.

    0 0

    The snapshot agent for the transaction replication does not create file in unc folder.

    What should I look into? The snapshot agent started and went to 0% after updating a lot of statistics and then keep waiting for response. Thanks,

    Message: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.   Command Text: sp_MSactivate_auto_sub  Parameters:  @publication = 'a_tran'   @article = %   @status = initiated    Stack:    at Microsoft.SqlServer.Replication.AgentCore.ReMapSqlException(SqlException e, SqlCommand command)     at Microsoft.SqlServer.Replication.AgentCore.AgentExecuteReader(SqlCommand command, Int32 queryTimeout, CommandBehavior commandBehavior)     at Microsoft.SqlServer.Replication.AgentCore.ExecuteWithResults(CommandSetupDelegate commandSetupDelegate, ProcessResultsDelegate processResultsDelegate, Int32 queryTimeout)     at Microsoft.SqlServer.Replication.Snapshot.TransSnapshotProvider.SetPublisherTranSequenceNumViaAutoSub(PublicationActivationState publicationActivationState, SqlConnection connection)     at Microsoft.SqlServer.Replication.Snapshot.TransSnapshotProvider.ActivateCSSPublicationAndSetTranSequenceNums(PublicationActivationState publicationActivationState, SqlConnection connection)     at Microsoft.SqlServer.Replication.Snapshot.TransSnapshotProvider.ConcurrentPreArticleFilesGenerationTransaction(SqlConnection connection)     at Microsoft.SqlServer.Replication.RetryableSqlServerTransactionManager.ExecuteTransaction(Boolean bLeaveTransactionOpen)     at Microsoft.SqlServer.Replication.Snapshot.TransSnapshotProvider.DoConcurrentPreArticleFilesGenerationProcessing()     at Microsoft.SqlServer.Replication.Snapshot.TransSnapshotProvider.DoPreArticleFilesGenerationProcessing()     at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.GenerateSnapshot()     at Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun()     at Microsoft.SqlServer.Replication.AgentCore.Run()


    0 0

    Continuing from the link below which has the similar issue.

    Exact error what I faced is below:

    "Error messages:
    The process could not execute 'sp_replcmds' on 'XXXServer'. (Source: MSSQL_REPL, Error number: MSSQL_REPL20011)
    Get help: http://help/MSSQL_REPL20011
    Could not locate text information records for the column "XXXCol", ID 875 during command construction. (Source: MSSQLServer, Error number: 18773)
    Get help: http://help/18773
    The Log-Scan Process failed to construct a replicated command from log sequence number (LSN) {0004456e1:00045334:003b}.
    Back up the publication database and contact Customer Support Services. (Source: MSSQLServer, Error number: 18805)
    Get help: http://help/18805
    The process could not execute 'sp_replcmds' on 'xxxserver'. (Source: MSSQL_REPL, Error number: MSSQL_REPL22037)
    Get help: http://help/MSSQL_REPL22037

    As per the link above I did not remove any subscriber but issue the following:

    --Updates the record that identifies the last distributed transaction of the server

    EXECsp_repldone @xactid=NULL, @xact_segno=NULL, @numtrans= 0, @time= 0, @reset= 1


    -- Flushes the article cache

    This started causing consistency issues like the below
    " Command attempted:
    if @@trancount > 0 rollback tran
    (Transaction sequence number: 0x000444EC00003423bnn24300, Command ID: 1)

    Error messages:
    The row was not found at the Subscriber when applying the replicated command. (Source: MSSQLServer, Error number: 20598)
    Get help: http://help/20598
    The row was not found at the Subscriber when applying the replicated command. (Source: MSSQLServer, Error number: 20598)
    Get help: http://help/20598

    To resolve this I have been now identfying the articles which are causing the errors and resolving the errors.
    So currently a "row was not found" error is coming and I am resolving it.
    I am just wondering if there is a way that I can check the consistency for all of the articles instead of waiting for the errors one by one. Once I get this information for all tables I will fix them at once.

    Secondly, I issues the repldone and flush, which I feel is a work around and not a solution.
    Is there not a alternate to fix the original issue so that we may not issue the repldone which is causing subsequent issues.


    0 0

    Hi All,

    I accidentally deleted my distribution db on my publisher & subscriber server with following steps:-

    before below steps i deleted subscription through right click on subscription in SSMS on subscriber server "SubData" and i also deleted publication by same procedure on published server "STBData".

    alter database distribution set offline;
    drop database distribution;

    Then i realize this is very wrong, after it i re-attached distribution db on both server through SSMS then run following commands:-

    exec sp_removedbreplication @dbname='distribution'

    exec sp_removedbreplication @dbname="STBData" (STBData :- from which articles to be publish).

    Now i am creating again Publication on "STBData" Server but it is displaying below error:-

    Pls help me how i can re-create publication to publish data i will be very thankful to you.

    Thanx again.


    0 0

    Hi !

    I'm getting this error when i want to setup a new subscription for my SQL Server 2005 merge publication. I copied snapshot files on the subscriber in a shared folder and set it on subcription's properties. subsciber is running Win 2008 OS. Please help.


    The merge process was unable to deliver the snapshot to the Subscriber. If using Web synchronization, the merge process may have been unable to create or write to the message file. When troubleshooting, restart the synchronization with verbose history logging and specify an output file to which to write. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201001)
    Get help: http://help/MSSQL_REPL-2147201001

    Incorrect syntax near 'Microsoft'. (Source: MSSQLServer, Error number: 102)
    Get help: http://help/102


    0 0


    we are using transactional repilication in sqlserver2008r2 when i am configuring repilication all was working fine but snapshot was not intializing automatically from old snapshot  folder when i am creating new subscription i am manually re-intializing it !!why it was happening??how can i set it to automatic

    0 0


    I'm using SQL Server 2005 and Merge Replication with only one Subscriber.

    Recently when I tried to insert data (around 2000 rows) to the Publisher (i.e. database) I got the following error:

    The insert failed. It conflicted with an identity range check constraint in database 'CustomerDatabase', replicated table 'dbo.Customer ', column ' Customer ID'. If the identity column is automatically managed by replication, update the range as follows: for the Publisher, execute sp_adjustpublisheridentityrange; for the Subscriber, run the Distribution Agent or the Merge Agent. The statement has been terminated

    My subscriber hadn’t been run for 3-4 months. Restarting the Merge agent also did not solve my problem.

    My last identity column value was 25000. After reading about the problem, I came to know that the identity range had expired. So I had to allocate new set of identity values.

    After executing the stored procedure "sp_adjustpublisheridentityrange" on table name, my identity value started from 706250. And the next 2000 rows had continuous values starting from 706250. Why there such a big difference?

    At the Publisher end (under Article Properties), my Publisher and Subscriber range for table had 100000 and 15000 values respectively for Customer table with threshold value 80.

    My problems are:

    1. After allocating new set of identity values to 706250, should I had to run the query to reseed from 25001 so that the next identity value was 25001 and not 706250?
    2. Will this problem reappear again? If yes, how can solve this so that it should never ever appear in future?
    3. How do I reproduce this issue?
    4. What would have happened if i had executed the stored procedure "sp_adjustpublisheridentityrange" on the Publisher?
    5. Will the same problem occur if multiple subscribers are used? If yes, how do i solve it?
    6. Can I edit the columns having identity value from 706250 back to starting from 25001..?

    Please suggest me solutions for all the 6 points if its valid...

    Thanks and Regards,


    0 0

    I try to setup a transactional push replication from MS SQL Server 2005 to Sybase ASE 12.5.3. ASE is known to MS SQL Server as a linked server using OleDB.
    As table schema and data are valid at subscriber site I don't need a initial snapshot for the replication.
    So I do some tests with sync_type (sp_addsubscription). First I tried 'none'. That works fine.
    But the documentation says that it is depricated an I should use 'replication support only'.
    But with this syn_type replication stops because is sends the following commands to the subscriber:

    -- Transactional replication custom procedures for publication 'kunktable_pub' from database 'kunktest2':
    ---- Replication custom procedures will not be scripted for article 'kunktable' because the auto-generate custom procedures schema option is not enabled.

     IF (@@microsoftversion >= 0x09000000) BEGIN EXEC sys.sp_MSrepl_setNFR @schema = N'dbo', @object_name = N'kunktable' END

    Of cause Sybase ASE throws an error 137 'Must declare variable '@@microsoftversion' because it has no system variable @@microsoftversion. Furthermore a procedure sys.sp_MSrepl_setNFR is not known at ASE site.

    So it seems, that sync_type ''replication support only' only works for MS subscriber but not for ODBC or OLEDB based subscriber like SYBASE.

    Do I miss something ?
    Is this a bug ?
    Which sync_type should I use ?


    0 0


    I have a .net application that executes TSQL scripts to create/alter tables, views and stored procedures in a database that is replicated to several suscriptors. I've recently added a logic to create the corresponding articles to replication using RMO, but I have a problem when I check if the article exists or not. The process is this:

    1. Execute create/alter table, create/alter view, create/alter stored procedure on database.

    2. Check if table/view/stored procedures exists on replication.

    2.1 If article does not exists, create it.

    2.2 If article does not exists, execute snapshot.

    If I create three new objects, Table1, Table1_view, Table1_sp, the snapshot executes ok and the three articles are added to replication and replication without problems, but if I alter this three objects, the alter view and alter stored procedure fails on suscriptors because the alter table is not replicated. The thing is, if I don't check if the articles exists, the three alter instructions replicate ok.

    Is there any problem with article.IsExistingObject? Do I have to consider something when I use it? Or finally, how do I check if an article exists using TSQL instead of RMO?

    Here is how I'm using RMO to check if article exists:

    article = new TransArticle();
    article.ConnectionContext = serverConnection;
    article.Name = "Table1";
    article.SourceObjectName = "Table1";
    article.DatabaseName = publicationDbName;
    article.SourceObjectOwner = schemaOwner;
    article.PublicationName = publicationDbName;
    if (ArticleType == "Table")
        article.Type = ArticleOptions.LogBased;
    else if (ArticleType == "StoreProcedure")
        article.Type = ArticleOptions.SerializableProcExecution;
    else if (ArticleType == "View")
        article.Type = ArticleOptions.ViewSchemaOnly;
    // Ensure that we create the schema owner at the Subscriber.
    article.SchemaOption |= CreationScriptOptions.Schema;
    if (!article.IsExistingObject)
        // Create the article.
        blResult = true;

    Thanks and regards!

    0 0


    I am setting up Heterogeneous replication and the details as follows:

    Publisher: Oracle dat source - Oracle 11g

    Distributor: MSSQL server 2008 R2, Enterprise Edition 64-bit

    Subscriber: MSSQL server 2008 R2, Enterprise Edition 64-bit

    Could anyone please help me for below questions:

    1. I am running SQL server on a failover cluster. should I have to take extra care when configuring replication on Cluster instance?

    - the snapshot folder I will be configuring through shared folder under failover cluster.
    More information on network share(snapshot folder) on cluster instance, Please share.

    2. I strongly, believe that configuring replication with "SQL server service account" as its a heterogeneous replication instead of creating a separate service account for Replication. - just to avoid the unnecessary complications.

    Any suggestions on this?



    0 0

    Hi Team,

    Can I ENABLE the Change Data Capture(CDC) feature on Subsription Database and its associated replicated tables?

    Should I have to consider any other aspects while Enabling? risk involved?

    (Publisher: Oracle 11g

    Subscriber and Distributor: SQL server 2008 R2)

    0 0

    I have a merge replication between toe databases named DB1 (publisher) and DB2(subscriber)

    Full database is set for merge replication(with push).One of the table in database has a column 'ChangesPk' with datatype int which is a primary key and it is identity column(is identity=yes) with identity increment of 1.

    @identityrangemanagementoption is set to auto,publisher range size is 10000 and subscriber range size is 1000 ,range threshold percentage is 80.The replication was working fine from about a i got a error when rows are inserting to subscriber database.The error was

    The insert failed. It conflicted with an identity range check constraint in database 'DB1', replicated table 'dbo.tablename', column 'ChangesPk'. If the identity column is automatically managed by replication, update the range as follows: for the Publisher, execute sp_adjustpublisheridentityrange; for the Subscriber, run the Distribution Agent or the Merge Agent. The statement has been terminated.         

    The merge agent is scheduled to run once in a day and i got this error about 2 hours before the scheduled time.So this error didn't came while synchronizing.

    The table has 3653 rows in publisher and 2450 rows in subscriber.About more than 1000 rows where inserted to subscriber table after last synchronization.I saw some of the articles in Microsoft and other website related to identity column,but i was not able to find reason for error in my case.Why this error comes when inserting values to subscriber database?how can i solve this?

    0 0
  • 03/11/13--09:23: Queue Reader Agent error
  • We are using transactional replication from sql server 2008 r2 publisher to sql server 2008 r2 subscribers. The publisher and distributor are on the same server.  We are not using updateable subscribptions but the the Queue reader agent appears to have been created and was running but now there is an error "The replication agent has not logged a progress message in 10 minutes.  ..."  I stopped the agent and deleted the queue reader agent job that was running since its not used but the publisher still shows the error in replicatio monitor.  is there something else we have to clean up for the queue reader agent to stop showing this error. Since updateable subscriptions are not used we don't needs this agent to run?

    0 0

    I have 6 transactonal publications running on a publisher.  The distributor is running on the same server.  The server is sql server 2008 r2.  There are 37 push subscribers on sql server 2008 r2.  Most of these publications hardly ever have any transcations and if they have any its only a few records at a time.

    I am seeing latency errors come and go from all publications and only some subscribers, then some publications all and some subscribers , and no publications no subscribers within minutes. Latency can show huge value in days or hours and then go away and show 0 and then come back in minutes.  And vice latency and then a huge value minutes later.

    I feel like I am running in circles to figure the out but I am starting to think its bogus monitor info.

    I run tracer tokens and the the latency shown when I do that is far better for the same subscriber that are showing latency error from the subcription details at that same time.

    Advise, tests, suggestions greatly appreciated:-)

older | 1 | .... | 31 | 32 | (Page 33) | 34 | 35 | .... | 181 | newer