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


Embed this content in your HTML

Search

Report adult content:

click to rate:

Account: (login)

More Channels


Showcase


Channel Catalog


Channel Description:

Discussions on SQL Server Replication

older | 1 | .... | 150 | 151 | (Page 152) | 153 | 154 | .... | 181 | newer

    0 0

    First of all please note the following carefully:

    • I have a source database named S_DB on one SQL Server hosted on a machine namedS_SRV, ON DOMAIN NAMED S_DOM
    • ON DIFFERENT DOMAIN named D_DOM, I have another machine namedD_SRV.
    • On the SQL Server instances hosted on the two machines (S_SRV and D_SRV) I have added a DOMAIN USER from D_DOM, and named [D_DOM\replUser]. This user is a db_owner on the source, destination databases, and distribution database, and it is also has full rights on the replication snapshot folder. 
    • the source SQL Server is 2012, the destination is SQL 2008 R2

    Now, using that [D_DOM\replUser] I have created successfully apublication on S_SRV. However, when I wanted to create the subscriber onD_SRV (which is from the same domain of the user ), I'm getting the following user:

    TITLE: New Subscription Wizard

    ------------------------------

    SQL Server could not retrieve the list of publications for 'XXXXXXXX'. 

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.0.3000.0&EvtSrc=Microsoft.SqlServer.Management.UI.CreateSubWizardErrorSR&EvtID=CantGetPublicationList&LinkId=20476

     ------------------------------

    ADDITIONAL INFORMATION: 

    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) 

    ------------------------------ 

    Could not obtain information about Windows NT group/user 'D_DOM\replUser', error code 0x5. (Microsoft SQL Server, Error: 15404) 

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.00.6020&EvtSrc=MSSQLServer&EvtID=15404&LinkId=20476

     ------------------------------

    BUTTONS:

    OK

    Where could be the problem? and what do you suggest to solve it?




    0 0

    I keep getting the following error message during the initial merge agent.

     

    ·         “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 the message file, when troubleshooting, restart the sychronzation with verbose history loggin and specify an output file to write.

     

    ·         Cannot fine the object “MSmerge_ctsv_B5ECD41086F24A64B8040A41A75B2DC4”, Because it does not exists or you do not have permission.  (source: MSSQLServer, Error number 15151)

     

    I do see this view in the publication and if I run the following command on the publisher I get…

     

    select * from Msmerge_ctsv_B5ECD41086F24A64B8040A41A75B2DC4

     

    I get

     

    tablenick rowguid generation partchangegen lineage colv1 marker logical_record_parent_rowguid logical_record_lineage

     

    (0 row(s) affected)

     

    I have another publication working on this same server that is working, both are from a copy from a template database.  Please advise to what this problem could be and what I can do to resolve this.


    Thank you,

    Pauly C


    0 0

    Hello , I have SQL2014 Merge Replication Setup with 2 publications create with static filters on [Contract] column in one table.

    Publication A is created with filter (A)as - [Contract] IN ('GH') AND NOT [Contract] IN ('AO','NG','CG','BF','NE','TG','SN','KE')

    Publication A has created subscriber Job AA on subscribtion

    Publication B is created with filter(B) as - [Contract] IN ('AO','NG','CG','BF','NE','TG','SN','KE') AND NOT [Contract] IN ('GH')

    Publication B has created subscriber Job BB on subscribtion

    Situation -

    • on the subscriber if i insert a row matching to filter A and execute Job AA , correctly the information get replicated to publisher
    • on the subscriber if i insert a row matching to filter B and execute Job BB , correctly the information get replicated to publisher

    user of subscriber database are inserting records correctly and each record inserted correctly qualifies filter of either  Publication A or Publication B

    The replication jobs are running every 15 mins .

    the issue comes when a record matching to filter A are inserted on subscriber and job BB gets executed , during replication the records matching to filter A gets inserted on publisher but it gets deleted on subscriber.

    and similar happens when record matching to filter B is inserted on subscriber and job AA gets executed ,  during replication the records matching to filter B gets inserted on publisher but it gets deleted on subscriber. 

    for both publications @use_partition_groups = trueis enabled for better partitioning of data.

    since we have partition group enabled , if Job BB runs it must ignore records which qualify for filter A as they are in different partition group and must only sync records qualifying filter B and vice versa.

    however it seems not been the case. 

    Please suggest if you have any clues for fixing this issue.

    thanks for your help.



    0 0
  • 03/16/16--05:36: Replication Latency issue

  • Hi All,
    We have transactional replication setup in our environment. We are observing latency error on only one database continuously. Currently, we are not using db and there would be no transactions also.  
    When I checked, I am not finding any undistributed commands and errors. The dbs are fine and all the dbs are replicating to the same server.
    Could you please let me know if there is any other reason for this latency issue only on that db.


    0 0

    Hi, in the KB 3051243 (https://support.microsoft.com/en-us/kb/3051243) only SQL 2012 and 2014 are mentioned.

    I have the same issue in SQL 2008 R2. Does the last CU for SQL 2008 R2 also fix this issue?

    Best,

    Daniel.


    Best Regards, Daniel.


    0 0

    Hi experts,

     

    I must admit, most of my experience comes from OLTP.

     

    Now I am supporting a Datamart (which is a subset of a huge DWH)…

     

    The way this was setup years ago is: hundreds of jobs with SPs inside with tons of MERGEs and UPDATES using several tables (temp/variables),everywhere… Problem is, it’s really hard to keep up/troubleshoot.

     

    Let’s say someone adds a column in a DWH, and I need to replicate it to the Datamart… I need to crazily look for such table,columns inside every SP…

     

    I find myself always searching in

     

      FROMsys.sql_modules m

          INNERJOIN

          sys.objects o

            ON m.object_id= o.object_id

     

     

    Anyway, when I asked why ‘Replication’ was not used to begin with; I received this reply…

     

    -We need to keep identity column on one server but not the other…

    -Some tables’ schema in one server is required different from the other.

    -The failed replication log reader will block the log file re-use and shrinking, which caused the log files very big.

    -Not every table needs to replicated.

    -Using the current script, we can implement the ETL in the script.

    -It is very easy to comment out the ETL script if something wrong while replication is built-in feature and we have to deal with the system tables in t-shooting with limitations.

     

     

    What do you think of these replies…? They don’t make much of a sense to me, but I would love to read expert opinion on this matter.


    0 0

    Hi,

    I have a database with a merge replication. Recently I wanted to change the size of the primary key column of a table and I failed all the methods I tried.

    Ex:

    tableItems

    ItemCode varchar(30) (Primary Key)

    ItemDescription varchar (100)

    ...

    What I want to do is to change the size of ItemCode column to varchar(50).

    Please anybody help me with a solution for this.

    Thanks in advanced.

    Chama


    0 0

    I have 2 servers connected over a low speed wan and we're running SQL Server 2008 with Merge replication.

    At the subscriber, sometimes when attempting to insert new rows, I get this error:

    A trigger returned a resultset and/or was running with SET NOCOUNT OFF while another outstanding result set was active.

    • My database doesn't have any triggers; the only triggers are the one created by the Merge replication
    • Also, whenever this error occurs it automatically rolls back the existing transaction
    • I am using DataTables and TableAdapters to insert and update the database using transactions

    What I have checked:

    1. the database log file size is below 50Mb
    2. Checked the source code for Zombie transactions (since I wasn't able to retrieve the actual error at the beginning)
    3. Checked the connection between the two servers and found it congested

    Questions:

    1. How to avoid this behavior and why it's occurring at first place?
    2. Why it's cancelling the open transaction?

    0 0

    When I try the following to rename a server:

    sp_dropserver 'OldServerName'

    I get the following error:

    There are still remote logins or linked logins for the server 'OldServerName'.

    If I try:

    select name,is_published,is_subscribed,is_distributor from sys.databases
    where is_published = 1 or is_subscribed =1 or is_distributor = 1

    I get:

    name            is_published     is_subscribed    is_distributor
    --------------- ------------      -------------      --------------
    distribution      0                    0                    1

    Then if I try:

    exec sp_dropdistpublisher @publisher ='OLD or New Server name'
    GO

    exec sp_dropdistributiondb @database = 'distribution'
    GO

    exec sp_dropdistributor @no_checks = 1, @ignore_distributor = 1
    GO

    I get:

    Msg 14071, Level 16, State 1, Procedure sp_dropdistpublisher, Line 99
    Could not find the Distributor or the distribution database for the local server. The Distributor may not be installed, or the local server may not be configured as a Publisher at the Distributor.
    Msg 14114, Level 16, State 1, Procedure sp_dropdistributiondb, Line 61
    The server 'OLD or New Server name' is not configured as a Distributor.
    Msg 21043, Level 16, State 1, Procedure sp_dropdistributor, Line 50
    The Distributor is not installed.
    Msg 14071, Level 16, State 1, Procedure sp_dropdistpublisher, Line 99
    Could not find the Distributor or the distribution database for the local server. The Distributor may not be installed, or the local server may not be configured as a Publisher at the Distributor.
    Msg 14114, Level 16, State 1, Procedure sp_dropdistributiondb, Line 61
    The server 'OLD or New Server name' is not configured as a Distributor.
    Msg 21043, Level 16, State 1, Procedure sp_dropdistributor, Line 50
    The Distributor is not installed.

    What is the solution please?




    0 0

    We are having Merge replication setup where we have 10 Publications and 6 Subscribers with pull subscription.

    We were facing the below error frequently on different subscribers. We initialized with Snapshot in the beginning but we need a fix so we had to contact Microsoft where they have advised us to upgrade to SQL Server 2008 R2 SP2 as we were having the Publisher at a different version and subscriber at a different version.

    We eventually upgraded the publisher and all the subscribers to SQL Server 2008 R2SP3 thinking this would solve the issue.

    Even after upgradation also we are facing the same error, now we tried to update the cleanedup_unsent_changes to 0 on Subscriber for the subcriptions that we are facing the problem but still we are facing the problem. 

    Please help in resolving this issue.



    The Merge Agent failed after detecting that retention-based metadata cleanup has deleted metadata at the Subscriber for changes not yet sent to the Publisher. You must reinitialize the subscription (without upload).



    0 0

    I have a pull merge subscription that has expired and I am trying to reinitilaize it. I select the subscription for reinitialization, then start the job.

    The job fails and the history shows and error of

    "The Merge process could not clean up the subscription to 'SERVER':'PUBLICATION'.
    "Parameter 1 is incorrect for this DBCC statement"
    "The merge process could not initialize the subscription. Ensure that the subscription exists at the publisher, and reregister the subscription if necessary".

    The publication is valid as it is still used by other servers.

    ANy help would be much appreciated.

    Thanks


    0 0


    Hi Technet

    I like ask a question regarding SQL Replication PUSH vs PULL Broadband Usage

    A) When we use PUSH replication method - is it using Download or Upload speed method to distribute data from publisher into subscriber

    B) When we use PULL replication method - is it using Download or Upload speed method to retrieve data from publisher into subscriber

    Regards
    douglasfoong


    douglas foong


    0 0
  • 03/22/16--21:20: Replication Error 20598
  • our transactional replication, sometimes fails with error 20598 - the row could not found on the subscriber.

    I think one common scenario, this can happen is when the row is actually deleted on Subscriber but that is not the case in this scenario.

    so, i am wondering what are the possibilities for this error to occur in transactional replication other than the deletion.

    right now, I am doing work around by skipping the error but very curious to know whats causing the error.


    Hope it Helps!!


    0 0

    Hello,

    We have setup Peer-to-Peer replication(push) for one of our production server to other.
    Replication latency remain high for few seconds go up-to to 5 hours and then come back to 0 after few seconds. This is happening frequently from last few days.
    This is happening on both server.
    Agent on both server in executing state.

    Can anyone please help me understanding the situation.

    0 0

    Is there any guidance out there regarding synchronization of databases over a WAN - which approach uses the least bandwidth.  

    • Log Shipping
    • Transaction Replication
    • Snapshot Replication
    • Always On

    This is for a database encrypted with TDE that has a fair amount of r/w activity and a lot of index maintenance going on.

    I know there are other design inputs to this decision, but I am looking specifically for feedback on bandwidth.  Any tips?

    Ben


    0 0

    I am having a similar problem as described in this link https://support.microsoft.com/en-us/kb/2295460  I am running the latest version of SQL Server 2014 Standard as well on both sides (Publisher and Subscriber)

    Microsoft SQL Server 2014 (SP1-CU5) (KB3130926) - 12.0.4439.1 (X64) 
    Feb 15 2016 12:12:43 
    Copyright (c) Microsoft Corporation
    Standard Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)

    I have merge replication setup for a table that contains 3 uniqueidentifier (null) columns one is the rowguid.  the publication is setup using that article with the default properties except for tracking level (column level), and Multi Column update (false). I also have a custom resolver that even when it looks like this fails with this message.

    The schema of the custom DataSet object implemented in the business logic handler does not match the schema of the source DataSet object. Verify that the custom DataSet object has been correctly defined. 

    public override ActionOnUpdateConflict UpdateConflictsHandler(DataSet publisherDataSet, DataSet subscriberDataSet, ref DataSet customDataSet, ref ConflictLogType conflictLogType, ref string customConflictMessage, ref int historyLogLevel, ref string historyLogMessage)
    {
        customDataSet = publisherDataSet.Copy();
        conflictLogType = ConflictLogType.ConflictLogSubscriber;
        customConflictMessage = "Custom handler invoked";
        historyLogMessage = "A conflict was detected and handled by the custome handler.";
        historyLogLevel = 1;
    
        return ActionOnUpdateConflict.AcceptCustomConflictData;
    }

    The issue occurs when you update a column on one side (publisher) with an actual value (uniqueidentifer) and the other side same column with a null. this causes a conflict and the dataset schemas are not the same.  the datasets data column on the side with the unidentifier value (publisher in this case) has a System.String datatype, and the dataset data column on the side with the null (subscriber in this case) has a System.Guid data type.  

    Please help, this needs to be fixed.  All other data types look to be fine, except for uniqueidentifier data types.



    0 0

    Hi everyone,

    I am running Sql Server 2008.

    After have completed the wizard for configuring my server as Distributor such database is not visible in the tree.

    I restarted all the services but nothing happens...

    In fact, distribution database has the same status than master, tempdb... (65544)

    User databases like 'Affinities' has 65536, here and everywhere (please provide me mapping Status Db -> Description)

    select name,dbid,sid,mode,status from sys.sysdatabases
    name    dbid    sid    mode    status
    
    master    1    0x01    0    65544
    tempdb    2    0x01    0    65544
    model    3    0x01    0    65536
    msdb    4    0x01    0    65544
    Affinities    5    0x010500000000000515000000911F96E73DB2483A99D4B1C6E8030000    0    65536
    distribution    6    0x01    0    65544
    f    7    0x010500000000000515000000911F96E73DB2483A99D4B1C6E8030000    0    65536
    Inma_Library    8    0x49379903EB8058448E42C4A7806313EA    0    65536

    Nevertheless, I can use it.

    USE distribution

    GO

    These are just a few tables in sys.tables DMO

    MStracer_tokens
    MSarticles
    MStracer_history
    MSsync_states
    MSsubscriptions
    MSmerge_articleresolver
    MSmerge_subscriptions

    What am I missing here? is it a bug in my SSMS 2012?



    0 0

    Hi all,

    My scenario is:

    I have a Transactional Replication between 2 servers, with a dedicated distributor in another server, with the following versions:

    Publisher - SQL Server 2008 R2 Enterprise Edition Service Pack 3
    Distributor - SQL Server 2008 R2 Enterprise Edition Service Pack 3
    Subscriber - SQL Server 2005 Service Pack 2 (Not upgraded yet because Biztalk app running on it).


    5 publications running ok (one of them have only one article with 500 million rows).
    1 publication not configured (This is the one which i need help, its a another single article publication, but with 700 million rows)

    The five OK was recreated las weekend, without any type of errors, but the last one at the moment of creating Primary Key after bulk insert, failed.
    (It shows the error of Duplicated Key, on the composite primary key).

    I tried doing it for 2 times, generating a new snapshot for each try but always the same problem.

    Its curious because after stopping the creation of Primary Key, and running a select to identify all duplicated keys, got different values.

    I set the method of snapshot for "concurrent" to not lock the production table.

    About the duplicated rows identified at the subscriber database, the values of composite PK is the same, but on the others columns is different.

    My guess is the row was updated while the snapshot was running.

    Can this issue happen?

    The difference for the table which ran perfectly is 200 million row. Can this cause this issue?

    0 0

    Hello Experts,

    Are there any performance counters or native SQL Server stored proc to monitor the memory usage of transactional replication.

    R..


    0 0

    I have followed the instructions listed in this https://msdn.microsoft.com/en-us/library/ms365150.aspx MSDN article but cannot get it working.  Can anyone shed some light on how to debug?  I have insalled VS 2015 on the subscriber and have the DLL dropped into the C:\Program Files\Microsoft SQL Server\120\COM folder.  I have my code listed below

        public class ReplicationBusinessLogicModule : BusinessLogicModule
        {
            private string _PublisherName;
            private string _SubscriberName;
            private string _ArticleName;
            private string _ReplicationTime;
    
            public ReplicationBusinessLogicModule()
            {
                var sb = new StringBuilder();
                sb.AppendLine("-------------------------------------");
                sb.AppendLine("In ReplicationBusinessLogicModule: " + DateTime.Now);
                sb.AppendLine("-------------------------------------");
                sb.AppendLine();
                System.IO.File.AppendAllText(@"C:\Temp\ReplicationBusinessLogicModule.txt", sb.ToString());
            }
    
            public override void Initialize(string publisher, string subscriber, string distributor, string publisherDB, string subscriberDB, string articleName)
            {
                _PublisherName = publisher;
                _SubscriberName = subscriber;
                _ArticleName = articleName;
                _ReplicationTime = DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss.fffffff", CultureInfo.InvariantCulture);
    
                var sb = new StringBuilder();
                sb.AppendLine("-------------------------------------");
                sb.AppendLine("In Initialize: " + DateTime.Now);
                sb.AppendLine("ArticleName: " + _ArticleName);
                sb.AppendLine("-------------------------------------");
                sb.AppendLine();
                System.IO.File.AppendAllText(@"C:\Temp\ReplicationBusinessLogicModule.txt", sb.ToString());
    
            }
    
            public override ChangeStates HandledChangeStates
            {
                get
                {
                    return ChangeStates.SubscriberInserts | ChangeStates.SubscriberUpdates | ChangeStates.SubscriberDeletes | ChangeStates.UpdateConflicts |
                        ChangeStates.PublisherInserts | ChangeStates.PublisherUpdates | ChangeStates.PublisherDeletes;
                }
            }
    
            public override void CommitHandler(SourceIdentifier source, Guid rowGuid)
            {
                var sb = new StringBuilder();
                sb.AppendLine("-------------------------------------");
                sb.AppendLine("In CommitHandler: " + DateTime.Now);
                sb.AppendLine("Source: " + source.ToString());
                sb.AppendLine("ArticleName: " + _ArticleName);
                sb.AppendLine("RowGuid: " + rowGuid.ToString());
                sb.AppendLine("-------------------------------------");
                System.IO.File.AppendAllText(@"C:\Temp\ReplicationBusinessLogicModule.txt", sb.ToString());
    
                base.CommitHandler(source, rowGuid);
            }
    
            public override ActionOnDataChange InsertHandler(SourceIdentifier insertSource, DataSet insertedDataSet, ref DataSet customDataSet, ref int historyLogLevel, ref string historyLogMessage)
            {
                var sb = new StringBuilder();
                sb.AppendLine("-------------------------------------");
                sb.AppendLine("In InsertHandler: " + DateTime.Now);
                sb.AppendLine("Source: " + insertSource.ToString());
                sb.AppendLine("InsertHandler: " + _ArticleName);
                sb.AppendLine("-------------------------------------");
                System.IO.File.AppendAllText(@"C:\Temp\ReplicationBusinessLogicModule.txt", sb.ToString());
    
                return base.InsertHandler(insertSource, insertedDataSet, ref customDataSet, ref historyLogLevel, ref historyLogMessage);
    
            }
    
            public override ActionOnDataChange UpdateHandler(SourceIdentifier updateSource, DataSet updatedDataSet, ref DataSet customDataSet, ref int historyLogLevel, ref string historyLogMessage)
            {
    
                var sb = new StringBuilder();
                sb.AppendLine("-------------------------------------");
                sb.AppendLine("In UpdateHandler: " + DateTime.Now);
                sb.AppendLine("Source: " + updateSource.ToString());
                sb.AppendLine("ArticleName: " + _ArticleName);
                sb.AppendLine("-------------------------------------");
                System.IO.File.AppendAllText(@"C:\Temp\ReplicationBusinessLogicModule.txt", sb.ToString());
    
    
                customDataSet = updatedDataSet.Copy();
                customDataSet.Tables[0].Rows[0]["NVarCharColumn"] = string.Format("Repl({0})", _ReplicationTime);
    
                return ActionOnDataChange.AcceptCustomData;
            }
    
            public override ActionOnUpdateConflict UpdateConflictsHandler(DataSet publisherDataSet, DataSet subscriberDataSet, ref DataSet customDataSet, ref ConflictLogType conflictLogType, ref string customConflictMessage, ref int historyLogLevel, ref string historyLogMessage)
            {
    
                var sb = new StringBuilder();
                sb.AppendLine("-------------------------------------");
                sb.AppendLine("In UpdateConflictsHandler: " + DateTime.Now);
                sb.AppendLine("ConflictLogType: " + conflictLogType.ToString());
                sb.AppendLine("ArticleName: " + _ArticleName);
                sb.AppendLine("-------------------------------------");
                System.IO.File.AppendAllText(@"C:\Temp\ReplicationBusinessLogicModule.txt", sb.ToString());
    
                return base.UpdateConflictsHandler(publisherDataSet, subscriberDataSet, ref customDataSet, ref conflictLogType, ref customConflictMessage, ref historyLogLevel, ref historyLogMessage);
            }
    
            public override ActionOnDataDelete DeleteHandler(SourceIdentifier deleteSource, DataSet deletedDataSet, ref int historyLogLevel, ref string historyLogMessage)
            {
                var sb = new StringBuilder();
                sb.AppendLine("-------------------------------------");
                sb.AppendLine("In DeleteHandler: " + DateTime.Now);
                sb.AppendLine("Source: " + deleteSource.ToString());
                sb.AppendLine("DeleteHandler: " + _ArticleName);
                sb.AppendLine("-------------------------------------");
                System.IO.File.AppendAllText(@"C:\Temp\ReplicationBusinessLogicModule.txt", sb.ToString());
    
                return base.DeleteHandler(deleteSource, deletedDataSet, ref historyLogLevel, ref historyLogMessage);
            }
        }




older | 1 | .... | 150 | 151 | (Page 152) | 153 | 154 | .... | 181 | newer