Quantcast
Channel: SQL Server Replication forum
Viewing all 4054 articles
Browse latest View live

"'ABC-Sub' is not defined as a Subscriber for 'XYZ-Pub'" Error when dropping a MERGE replication subscriber

$
0
0

Hello,

I am getting the following error:

Msg 20032, Level 16, State 1, Procedure sp_MSdrop_merge_subscription, Line 72 [Batch Start Line 2]

'ABC-Sub' is not defined as a Subscriber for 'XYZ-Pub'.

Msg 14056, Level 16, State 1, Procedure sp_dropmergesubscription, Line 482 [Batch Start Line 2]

The subscription could not be dropped at this time.

 

when trying to run:

EXECsp_dropmergesubscription

  @publication='Mrg_Repl',

  @subscriber ='ABC-Sub',

 @subscriber_db ='Sub-DB';

although when I run:

USE XYZ-Pub

Go
sp_helpmergesubscription


I get:

Help please :(


Sql Server Replication

$
0
0

Hi Team,

i need to migrate 5tb database from sql server 2000 to sql server 2008R2 and database is configured with Transnational Replication  can any one help me out how to do for this large database and how much time approximately it will take migrate by using backup and restore by using network  path and  then how to configure Transnational Replication ? 

Difference SQL Replication/SQL Log shipping/SQL Database Mirroring and SQL Availability Groups

$
0
0


Difference between SQL Replication/SQL Log shipping/SQL Database Mirroring  and SQL Availability Groups

Is SQL AG combination of SQL Mirroring and Win failover cluster?

Likely scenarios to choose these technologies :

Once SQL AG is set up, does SQL Log shipping/SQL Database Mirroring is required?

 



Why does Microsoft document recommends @immediate_sync for initializing a replication from backup

$
0
0

Hi Guys,

 I am reading the sync from backup documentation.  In step 2, under warning it says

To avoid missing subscriber data, when using sp_addpublication with @allow_initialize_from_backup = N'true', always use @immediate_sync = N'true'.

Why do we need to use @immediate_sync? I have tested without it and it seems to not lose data as long as we have the transactions available in the distribution database.

sp_refreshsubscriptions document question

$
0
0

Hi Guys,

I am going through the documentation for sp_refreshsubscriptions and it says its for pull subscription.  From my testing it looks like we need to run it for both pull and push subscription when immediate_sync is false.

https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-refreshsubscriptions-transact-sql?view=sql-server-2017

Could anyone confirm.

Cheers

Distribution clean up: distribution job failure

$
0
0

Dear All,

 

I'm currently having an issue with the "Distribution clean up: distribution" job which is a default job created for Replication. Would you please let me know how this issue can be resolved as it is scheduled to run every 5 minutes and keeps failing with the following error message:

 

NT SERVICE\SQLSERVERAGENT. Could not remove directory '\\DIRECTORY'. Check the security context of xp_cmdshell and close other processes that may be  accessing the directory. [SQLSTATE 42000] (Error 20015)  Replication-@rowcount_only parameter must be the value 0,1, or 2. 0=7.0 compatible checksum.  1=only check rowcou: agent distribution@rowcount_only parameter must be the value 0,1, or 2. 0=7.0 compatible checksum. 1=only   scheduled for retry. Could not clean up the distribution transaction tables. [SQLSTATE 01000] (Message 14152).  The step failed.

 

 

 

Thank you in advance!


Disaster Recovery For SQL Server Replication Distributors

$
0
0

Hi,  We have SQL Server 2014. We need to setup DR for distributors. Distributors can't be part of Always On. What are the other options? 

Thanks

Replicating from new versions of Oracle?


Transactional Replication from SQL Server 2005 to 2017

$
0
0

As per the msdn, Subscriber version depends on the type of publication: A Subscriber to a transactional publication can be any version within two versions (n-2) of the Publisher version. For example: a SQL Server 2012 Publisher can have SQL Server 2014 and SQL Server 2016 Subscribers; and a SQL Server 2016 Publisher can have SQL Server 2014 and SQL Server 2012 Subscribers.

I am having a requirement where I need to transactionally replicate a SQL Server 2005 to 2017, and as per the above msdn note we cannot do it, right?

But when I created a test environment and configured replication from 2005 to 2017 it is working fine. Any explanation to that? I am not able to understand why is it happening.

Switching Partition between Replicated table to non replicated table

$
0
0
Experts, i have a system where i am going to setup P2P transactional replication with switch partition. So have a scenario where i have to switch partition with millions of rows to non replicated staging table? i am not seeing any issue technically.

Regards JakDBA Please Mark this as Answered if this solves your issue or satisfied with the response.

Separating Database

$
0
0
Hi, I do have two databases from two locations with replication enabled but now we decided to have these two databases completely separated from each other. Removing or disabling replication is easy but I am now worried about the apps that depend on these databases. Database A, table A will have some additional columns compared to Database B, table A. 
My question is, do I need to separate my app as well or just create separate classes for each database? 
Regards

Filters in Merge replication

$
0
0

Hi,

I have set up a merge replication with dynamic filter HOST_NAME().

I want to know if subscriber filter table can has data (rows) out of partitions, and didn't synchronize to publisher table.

when i insert row in subscriber table out filter partition, it deleted after synchronization with publisher table.

Thanks,

synchronize Tables B/W different Network

$
0
0

we have server1 @ cloud VM 

    & server2  @ on-premises local VM.

we need to some tables need to synchronize every 15 min (with out Database going to offline/restoring state)

what are the method available for that?  ( i can connect both machines using SSMS vice versa )

( while try replication :   

     it's different network,   i created publica & distribution on CloudVM & snapshot folder also there. but subscribr(loval vm) not able to access snapshot folder. & both SQL agent runs under -NT Service\SQLSERVERAGENT)   

)



Transactional replication latency issue

$
0
0
Hi,

W‌e configured Transactional replication. Suddenly in the replication monitor the current average performance it is showing as critical. I inserted tracer token .From publisher to distributor it is showing pending,distributor to subscriber showing as pending. total latency is as pending.

T‌he data is not replicating. what are the things i need to do to resolve the issue. Please guide. 


T‌hanks,
J‌o

pols

Merge Replication - system trigger corruption

$
0
0

I have an application at a client site that has been deployed for almost 5 months. Things have been running fairly smoothly. The database uses merge replication to replicate data to remote clients via web sync. There are several publications, one subscription for each publication.

 

Last week, we deleted one of the publications.

 

This seems to have corrupted the table triggers that handle replication.

 

For example, the Headers table contains 3 triggers:

 

MSmerge_del_33E1341A8E1445F1BA4A9AE3453AD4EC

MSmerge_ins_33E1341A8E1445F1BA4A9AE3453AD4EC

MSmerge_upd_33E1341A8E1445F1BA4A9AE3453AD4EC

 

Now, whenever we attempt to update, insert, or delete a header record, we get the following error message:

 

Msg 208, Level 16, State 1, Procedure MSmerge_upd_33E1341A8E1445F1BA4A9AE3453AD4EC, Line 21533

Invalid object name 'dbo.MSmerge_repl_view_C46DF051E0C5498DA208189F1580448D_5F186CBD964D48C497A87B98789D0114'.

 

 

I have determined that C46DF051E0C5498DA208189F1580448D is the publication ID of the deleted publication.

 

Apparently this problem exists on every replication-related trigger on every table in the database. For example, if I attempt to update the Addresses table, I get a similar error message.

 

 

My question: Is there a way to have SQL Server "regenerate" all the triggers on all the tables? I assume there must be a stored procedure somewhere to do this, since stored procedures are what create the replication triggers to begin with.

 

 

Any feedback appreciated, we're sort of dead in the water here, since we can't process updates on the central server at this time.

 

 

Can I combine FCI with Replication?

$
0
0

We have replication in place. A publisher and a subscriber(read-only). No High availability set up as of now. 


We are planning to have Failover cluster Instance with MSSQL 2016 standard edition. 

We also need a read-only copy. Will it be possible to have replication (for a read-only copy) on top of FCI. Please suggest.

Any pointers to some articles would be great too! 

Thanks in advance



Merge Replication - Conflicts occur when no conflict SHOULD happen

$
0
0

I am a consultant DBA filling in for the DBA who has gone onto new adventures.

My client has PULL merge replication in place with 18 subscring servers on serveral publications.

The retention period has been kept very low at 3 days due to the volumne of data that is getting replicated.

I have come across an issue which is causing my head to hurt, a subscriber creates a record, it gets replicated as an INSERT as we there is an AUDIT table in place which captures the UTC datetime it occurs, eveybody happy at this stage. Just less than 3 days later an UPDATE is carried out to the record, row replicates, still eveybody happy.

Then four days later (last update: 08/03/2019  02:03:55  new update: 12/03/2019  08:01:33) this is when we get a conflict, in the conflict viewer it states that there was a update at the PUBLISHER and that is the winner, which was the update that was applied at the 08 March @ 02:03:55 and that the looser is the latest update that was carried out by the subscriber on the 12March @ 08:01:33

I have double-checked all the audit tables across all the servers and they all have same entries, you can see the different update date on the audit record when replication kicks in on each server, but I cannot see a record on the publisher that is causing the conflict to happen, all I can think of is that the retention period is less than the time-difference between the updates, therefore the publisher will always win with an update that is outside of the retention period, or am I being thick?

Transaction (Process ID 76) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction

$
0
0
 Hi All,

Two days before , i did some changes in all over MY SQL Server. i am not sure about what i did. But After that changes , in our application continuously we are getting the below error.

Transaction (Process ID 76) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction

What setting i  have to check and change in SQL server to avoid this deadlock?

  

Thanks,
Sowndaiyan

Firewall ports for Transactional Replication between AlwaysOn and Standalone system in 2 different domains/networks

$
0
0

We got a 2-node AlwaysOn environment (SQL 2014) in one domain and need to configure Transactional replication to a standalone system (subscriber) in a different domain. As SQL 2014 does not support adding distributor database to Availability Group, we will be configuring distributor on the subscriber (snapshot folder will also be located on the distributor)

All are default instances listening on 1433.

  • Can anyone advise the firewall ports I need to open and in which directions ?
  • Does the firewalls need to be opened just for the AG nodes or just listener or all 3 ?
  • Does it make any difference if its configured as pull or push considering both subscriber & distributor on the same server ?
  • Do I need to create alias on either side ?
  • Do I need to run browser service on either side ?



distribution..MSPublications table shows publisher_id = 1

$
0
0

Hi,

I am running the query below for serveral years on different customers with an intention that distribution..MSpublications.publisher_id is always equal to your sys.servers.server_id

select top 1 publication, name, data_source, s.publisher_db  from distribution..MSpublications p, distribution..MSsubscriptions s, sys.servers
where p.publication_id=s.publication_id and p.publisher_id=s.publisher_id
and (server_id = s.publisher_id or server_id=s.subscriber_id)

I have got an issue recently on a customer where my publisher_id in the MSpublications table = 1 which then points to repl_distributor as seen in the screen shot below.

My question is to confirm following:

My assumption on the distribution..MSpublications.publisher_id is always equal to your sys.servers.server_id is correct

Regards,

IA

Viewing all 4054 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>