Quantcast
Channel: StackExchange Replication Questions
Viewing all 17268 articles
Browse latest View live

Replication - User defined table type not propagating to subscriber

$
0
0

I created a User defined table type named tvp_Shipment with two columns (id and name) . generated a snapshot and the User defined table type was properly propagated to all the subscribers.

I was using this tvp in a stored procedure and everything worked fine.

Then I wanted to add one more column created_date to this table valued parameter.I dropped the stored procedure (from replication too) and also i dropped and recreated the User defined table type with 3 columns and then recreated the stored procedure and enabled it for publication

When I generate a new snapshot, the changes in user defined table type are not propagated to the subscriber. The newly added column was not added to the subscription.

the Error messages:

The schema script 'usp_InsertAirSa95c0e23_218.sch' could not be propagated to the subscriber. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201001)
Get help: http://help/MSSQL_REPL-2147201001
Invalid column name 'created_date'. (Source: MSSQLServer, Error number: 207)
Get help: http://help/207

SQL Server : subscription : how to know if a table is under replication/subscription

$
0
0

In SQL Server, on the "Subscription side", how can you know if a table is under replication/subscription?

Any idea?

Throttling SQL server Replication?

$
0
0

We have a performance issue with the current transactional replication setup on sql server 2008. When a new snapshot is created and the snapshot is applied to the subscriber, we see network utilization on the publisher and the distributor jump to 99%, and we are seeing disk queues going to 30 This is causing application timeouts.

Is there any way, we can throttle the replicated data that is being sent over? Can we restrict the number of rows being replicated? Are there any switches which can be set on/off to accomplish this?

Thanks!

How can I slow down a MySQL dump as to not affect current load on the server?

$
0
0

While doing a MySQL dump is easy enough, I have a live dedicated MySQL server that I am wanting to setup replication on. To do this, I need dumps of the databases to import to my replication slave.

The issue comes when I do the dumps, MySQL goes full force at it and ties up resources to the sites that connecting to it. I am wondering if there is a way to limit the dump queries to a low priority state to which preference is given to live connections? The idea being that the load from external sites is not affected by the effort of MySQL to do a full dump...

How to check replication snapshot agent status?

$
0
0

I'd like to check the status of the agent after I start it using this statement

EXEC sp_startpublication_snapshot @publication

As I want to do a next step that needs the job to be already started.

Distribution agent can't connect to subscriber

$
0
0

I have two servers on different untrusted domains. Server A is the publisher and is running SQL Server 2008 R2. Server B is the subscriber and is running SQL 2008 R2 Express. Since the servers are on separate domains without a trust relationship, I am using pass-through authentication to connect to each server. This involves creating a local windows account on each server with the same username and password and then using windows authentication to connect to the remote server. Using this method, I am able to connect Server A to Server B and vice versa in SQL Server Management Studio. I am also able to create a transactional publication on Server A and create a push subscription to it on Server B.

However when I open up the View Synchronization Status Window, I get the message "The process could not connect to SUbscriber 'Server B'." Opening up Replication Monitor gives me the following error messages:

The process could not connect to Subscriber 'Server B'. (Source: MSSQL_REPL, Error number: MSSQL_REPL0)

Named Pipes Provider: Could not open a connection to SQL Server [53]. (Source: MSSQLServer, Error number: 53)

A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. (Source: MSSQLServer, Error number: 53)

Login timeout expired (Source: MSSQLServer, Error number: HYT00)

Everything else that I have read about this error says that it's a permissions issue, but I don't think this is the case. Just to make sure that there weren't any permissions issues, I made the windows accounts that I am using for the pass-through authentication local administrators on each server, db_owners on both the publisher and subscriber databases, and sysadmins on each instance of SQL Server.

Does anyone know if something other than permissions could be causing this error? What confuses me is that the servers are clearly able to connect to each other using the pass-through authentication, but the connection still fails at the distribution agent.

MySQL 5.6 replication causes 'waiting for table lock'

$
0
0

All of the sudden queries on slave server stopped with status "Waiting for table level lock"

I restart mysql service and stop replications and locking does not show up anymore. Once I turn replications back on I see huge increase in "waiting for table level lock" status for queries (show full processlist)

Replication is crucial for our situation and we can't keep it turned off.

What might cause this problem? Replication was running fine for last 5 months or so.

MySQL 5.6

Replicate a filtered subset of data: Merge or Transactional replication?

$
0
0

First of all thanks for reading.

I need to replicate a subset of data that is based on a join filter; filter based on a join with an other table (Microsoft:"Using join filters, you can extend a row filter from one published table to another."). This is the setting:

  • SQL Server 2012;
  • replication sources on a subscription of a transaction replication
  • replication needs to be one direction sync (from publisher to subscriber);
  • only one subscriber/subscription;
  • small dataset with not many transactions;
  • WAN network.

What I established so far:

Option 1 - Create views and replicate those to tables via Transactional replication.

  • pros: no triggers are used,

  • cons: objects like key, constraints are not replicated

Option 2 - Use Merge replication with the join filter and set @subscriber_upload_options = 2 (download only).

  • pros: native MS functionality, all objects are replicated

  • cons: merge replication uses triggers, these won't be fired with bulk loads.

The results of these two approaches are exactly the same. However the technique differs, for example the different Agents that are used.To my understanding Merge replication is especially for server - client architectures, which is not my case but.. it works..

Because of the result is the same I am a bit in doubt which approach I should follow. I was hoping that you can give me some points to consider or advice me in which approach I should follow.


Is a Transactional Replication Snapshot processed as a 'bulk insert'

$
0
0

I have a Merge replication that sources on a subscription from a Transactional Replication. I know that the triggers regarding the Merge replication are not fired by 'bulk inserts':

Microsoft: When data is loaded into tables using the bcp Utility or the BULK INSERT command, by default, the merge replication triggers that maintain tracking data in the MSmerge_contents system table are not fired.

For establishing the transactional replication a snapshot is needed. Question: is the snapshot a bulk insert; will it not fire the merge triggers?

Replacing SQL replication

$
0
0

We are looking to replace SQL SERVER replication.

Today we've got several version on SQL installations because SQL replication does not support working with different SQL versions (2005 and 2008 for example), so instead of having several installation of SQL version (2005,2008,2012 etc...), we are looking install a single version on the server (let's say 2014) and using this version to replicate between all our clients (2005+).

Today we are using transnational and merge replication at the same time for each database.

I would like to know:

  • Is there a way to make different version replicate with each other?
  • Is there and good tool that can replace that replication?

Can't get access to streaming replication stats in PostgreSQL

$
0
0

I have streaming replication which I need to monitor. So there is a special user for Zabbix. I don't want to use pg_mongz and decided to set my own queries to pg_catalog schema's view pg_stat_replication to get replication state.

When I use query:

select * 
from pg_stat_replication;

it returns replication state record for admin. But when I logged in as monitoring user it returns just:

pid, usesysid, usename, application_name

So such parameters as client_addr, client_hostname, client_port, backend_start, state, sent_location, write_location, etc. are empty.

First I granted rights to my user on schema and tables:

grant usage on schema pg_catalog to usrmonitor;
grant select on all tables in schema pg_catalog to usrmonitor;

but it didn't help. When I looked at view I found that query uses functions and granted execution:

grant execute on function pg_stat_get_wal_senders() to usrmonitor;
grant execute on function pg_stat_get_activity(integer) to usrmonitor;

But the select query still returns empty columns. What maybe the problem?

bdr_init_copy hangs indefinitely

$
0
0

Fairly new to Postgresql, but have to get replication set up. I settled on BDR, and it works fine in the local demo, but on distributed machines it starts to get problematic, mostly because I have no real clue what the hell I am doing, and I cry myself to sleep pining for MySQL. I've gotten BDR working accross multiple servers, almost. When I run:

SELECT bdr.bdr_node_join_wait_for_ready();

on the joining nodes it hangs. This happens on both DB2 and DB3. DB1 returns a valid response. Researching this I came across the bdr_init_copy command, which apparently does everything I have been doing by hand, and then some. so tried that out. Now, when I run:

/usr/lib/postgresql/9.4/bin/bdr_init_copy -d "host=192.168.1.10 dbname=demo3" --local-dbname="host=192.168.1.23 dbname=demo3" -n db2 -D bdr_data

I get

bdr_init_copy: starting ...
Getting remote server identification ...
Detected 2 BDR database(s) on remote server
Updating BDR configuration on the remote node:
 demo2: creating replication slot ...
 demo2: creating node entry for local node ...
 demo3: creating replication slot ...
 demo3: creating node entry for local node ...
Creating base backup of the remote node...
63655/63655 kB (100%), 1/1 tablespace
Creating restore point on remote node ...
Bringing local node to the restore point ...

And it sits there. I am assuming that it is the same cause for both issues. as far as I can tell there are no log entries created on the local node (db2) but the following is present on the remote(db1)

2016-10-12 22:38:43 UTC [20808-1] postgres@demo2 LOG:  logical decoding found consistent point at 0/5001F00
2016-10-12 22:38:43 UTC [20808-2] postgres@demo2 DETAIL:  There are no running transactions.
2016-10-12 22:38:43 UTC [20808-3] postgres@demo2 STATEMENT:  SELECT pg_create_logical_replication_slot('bdr_17163_6340711416785871202_2_17163__', 'bdr');
2016-10-12 22:38:43 UTC [20811-1] postgres@demo3 LOG:  logical decoding found consistent point at 0/5002090
2016-10-12 22:38:43 UTC [20811-2] postgres@demo3 DETAIL:  There are no running transactions.
2016-10-12 22:38:43 UTC [20811-3] postgres@demo3 STATEMENT:  SELECT pg_create_logical_replication_slot('bdr_17939_6340711416785871202_2_17939__', 'bdr');
2016-10-12 22:38:44 UTC [20812-1] postgres@demo3 LOG:  restore point "bdr_6340711416785871202" created at 0/50022A8
2016-10-12 22:38:44 UTC [20812-2] postgres@demo3 STATEMENT:  SELECT pg_create_restore_point('bdr_6340711416785871202')

Any help out there?

Can merge replication operate with 0 ms delay, i.e. be real-time?

$
0
0

I'm facing an issue that I have two identical databases on different servers and both working as read/write and data are inserted on both. The thing is there is a merge replication between the two databases and it's working fine but there is a minute delay until the data is synchronized. What I want is to remove this delay. I want the data to be synchronized immediately.

What kind of solutions can I apply? Is there another feature like replication but without delay, or can I make the replication work without a delay, i.e. to be real-time. Any suggestion please. Appreciate the help.

The format of a message during Web synchronization was invalid. Ensure that replication components are properly configured at the Web server.

$
0
0

Getting the error "The format of a message during Web synchronization was invalid. Ensure that replication components are properly configured at the Web server" in SQL server 2012 using merge replication.

We have tried changing the registry key value

WebSyncMaxXmlSize to 4Gb but still getting the same error. It fails when we are using large chunk of data failing at 3100 chunks

Merge Replication - Invalid Column Name

$
0
0

Good Day everyone,

I am battling with a merge replication. I added a new column to an existing Merge Replication and Rerun the snapshot.

This replicates to 3 different servers in different locations. 1 Replication works perfectly, but 2 of the replication fails with the following error:

The schema script 'ProductionCategories_8.prc' could not be propagated to the subscriber. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201001) Get help: http://help/MSSQL_REPL-2147201001 Invalid column name 'SortOrder'. (Source: MSSQLServer, Error number: 207) Get help: http://help/207

When viewing the table where the referenced column is located the Column is in both the publisher and relevant subscribers.

I also checked spelling and case to ensure there are no Case Sensitivity or silly spelling mistakes, but all is fine.

I really need to get this sorted as group reporting is being hampered by this.

Any suggestions will be greatly appreciated.


Delete all the contents from a kubernetes node

$
0
0

How to delete all the contents from a kubernetes node?
Contents include deployments, replica sets etc. I tried to delete deplyoments seperately. But kubrenetes recreates all the pods again.
Is there there any ways to delete all the replica sets present in a node?

Bypass the 24 snapshot limitation in set-vmreplication -RecoveryHistory. (powershell,hyperv replica)

$
0
0

It my first question in here, I work in project to automate hyper-v replica solution.

so my problem is that in powershell

set-vmreplication -RecoveryHistory  

-RecoveryHistory

has 24 like a max value and i want to pypass that my need it's 72.

  1. i try to see the code source but it's in binary i can't do anything in that way (#microsoft : * _ *:).
  2. i post in microsoft forum and nothing

enter image description here the error (in french) it say 72 > 24 that all.

so if someone has a solution or a beginning of solution that will be very helpfull.

thank you all. and have a nice day.


@gvee #gvee

Hi and thank you for your help but...

i test that in my lab and that's not true the ps cmd :

Set-VMReplication VM01 -RecoveryHistory 24 -VSSSnapshotFrequencyHour 4

it does 24 snapshot and every 4 hours it does a synch snapshot and in total i have 24 snapshots( 18 standart ans 6 coherent )

so in final it doesn't solve my initial problem : store more than 24 hours snap with hyper-v replica

SQL Replication not working correctly.

$
0
0

I have a transactional SQL Server replication set up. Currently everything I have review seems to show that the replication is working. I have reviewed the Replication Monitoring and Sync State and both show that transactions are being pushed across correctly.

The problem I am having is that some of the replicated tables aren't even coming across while other are. Is there a better way to look deeper into Replication to find out why things aren't coming across?

How to replicate huge data table in SQL Server 2012

$
0
0

I have the same database on two servers and I am using merge replication for around 35 tables, and it is working fine.

But whenever I add 2-3 more tables with around 1 million records, the replication breaks after some time/days.

Can I do 2 replications on same database? Say 1 replication for those 35 tables and another one for 2-3 new tables?

Please suggest resolution for those bulk table data replication via merge method.

SQL Server could not display the Schedule dialog box

$
0
0

I'm trying to establish a merge replication between SQL Server 2012 (SP2) servers. In the New Subscription Wizard, I want to setup the Agent Schedule and I have the following error when selecting "Define schedule..."

enter image description here

Of course I have Googled the error but can't find anything helpfull.

thanks for your time and help

Viewing all 17268 articles
Browse latest View live


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