Hi,
How can I replicate 2 tables with the same name but indifferent schema(arq.tst, dbo.tst). I am getting error trying to replicate those 2 tables to another database. is there a way to do that?
Hi,
How can I replicate 2 tables with the same name but indifferent schema(arq.tst, dbo.tst). I am getting error trying to replicate those 2 tables to another database. is there a way to do that?
The server I am running has identity Management set to automatic for most of the tables I am replicating (A hand full have been set to manual). When the replication goes to change the range it changes the constraint BUT it does not change the identity seed of the table.
When users try and insert records, I get the not so clear message of
"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."
These steps never seem to work and I end up have to reseed manually. Is there a setting I am missing? I have some suspicion that because some of the tables are set to manual and some set to automatic, the sp_adjustpublisheridentityrange does not work correctly when it is run by the merge process (If I run sp_adjustpublisheridentityrange manually with the @publication set, it errors out. If I run sp_adjustpublisheridentityrange with @table_name set, it works).
Two questions in one. Have a live database that I need to setup replication on. Turns out replication wasn't loaded when the database was, so I'm going to need to add replication to the live database. Can that be done with the database still live or will the database need to be brought down?
Secondly, since the database was installed, SP1 was added. The dialog when I attempted to add a publication said to use the original install media to add replication. Since SP1 was added, do I really use the original install media or should I use the SP1 install media?
Thanks in advance,
Terry
Hi,
i'm trying to create a transactional replication from DB A to DB B. Definition of A and B are the same, and i want to keep the B database with all the indexes, constraints, keys, ...
But after the snapshot is done, some of the constraints disappear. In Article properties, i set the "Copy default value specifications" and "Copy check constraints" to true. However, check constraints are removed from subscription DB and also some of the default constraints. I noticed, replication keep only constraints with constant default value (for example 0). If the value is function, its gone. The function exists in both databases, so i think, there is no problem with keep this constraints in subscription database.
I'm using latest SQL Server 2016 (developer edition).
Is this a bug, or a normal behavior?
Hi all,
I have a situation to apply SP3 to SQL Server 2008R2 which has Peer to Peer replication.
Present version: SQL Server 2008R2 SP1
Please suggest <g class="gr_ gr_285 gr-alert gr_gramm gr_run_anim Grammar only-ins replaceWithoutSep" data-gr-id="285" id="285">best</g> way to apply the SP3 on Peer to Peer replication servers on SQL Server 2008R2
Turn off replication on both servers.
Make sure full backup in place
Apply SP3
Reboot servers.
Turn on replication.
or
Apply SP3 to Distributor
Apply SP3 to Publisher
Apply SP3 to Subscriber
Thanks in advance
SNIVAS
I am receiving this error when trying to install the replication feature to an existing instance. Has anyone encountered this error under these circumstances? Any suggestions are appreciated.
Hi
I have been using Merge replication for the last number of years.However I have now moved the master database to a Cloud environment.
My problem is with the initial replication when setting up new Subscriptions. The problem seems to be with permission rights on the ReplData folder. ie I get access denied errors when performing the first Replication.
To overcome this problem, I have to VPN on to the cloud server, I then try to access the Repldata folder - at which point I am prompted for an Admin Username & Password. Once I enter this and can see the folder the Replication will work ok.
Once the initial replication is complete - I no longer need to have VPN access and subsequent replications work fine (unless I need to Re-Initialize).
So - my question is, Is there anything I can no at the SERVER end - so that new subscriptions can be created without the need for me to access then repldata folder with Admin rights
david
something is not right with replication clean up job. MS_repl_commands keep growing huge (SQL version 2014 SP1) Made following attempts to resolve below, but its not fixed any help is really helpful. 1)Made replication immediate_sync = o for all publication 2) Execute cleanup via SSMS to delete JUST oldest day. (24 hours @ 5 days = 120), then continue to reduce the @max_distretention valued by a few hours for each run. but it didn't help. EXEC dbo.sp_MSdistribution_cleanup @min_distretention = 0, @max_distretention = 120 what are my next step to troubleshoot? |
We are a sql 2014 transactional push replication setup, the publisher, distribution server and a subscriber are on-site and it is working. Recently I added a new SQl 2014 subscriber which is located in Azure cloud. This Azure sql server belongs to a workgroup in our Azure environment unlike the domain environment in our on-site data center. To address the connectivity issue, I added an entry of the azure sql server name and IP address in the Hosts file of the publisher Sql server and the distribution server. This allows me to add the new Azure subscription to the existing publisher. The snapshot generated successfully when I started the snapshot agent job. I see the table and its related replication stored procedures being generated in the Azure subscriber. However, when the distribution agent tries to sync the data to the subscriber, I see this "The process could not bulk copy into table". The confusing part about this error is that I am seeing a very small number of records being replicated to this azure subscriber table. For example, the publisher table has10,150,361 and the subscriber so far is stuck at 410,501 and not incrementing. There is no filter involved.
The replication monitor shows the following sequence of events:
Bulk coying data into the table 'xxxx' (about 10 of this line)
Skipping file 'xxxxxx_2#1bcp' because it has already been delivered for a previous article or by a previously interrupted snapshot";
skipping file"xxxx_2_sch' because it has already been delivered for a previous article or by a previously interrupted snapshot. Please advice on what the issue is and how to fix it.
Skipping file 'xxxx_2_pre' because it has already been delivered for a previous article or by a preiously interrupted snapshot.
Initializing
The process could not bulk copy into table 'xxxxxxxxx'
Then repeat and on and on.
Please advice on how to address this Azure subscription issue.
Thanks
OD.
Ocean Deep
can i write a script which will check if replication log reader agent is running under SQL service account if not then modify it to run under SQL service account.
please help on this
SQL Server DBA
Merge replication on SQL 2014.
Is there a way to obtain the value in sysMergeArticles.ObjId through RMO ? I don't see any properties containing it in the RMO class.
PS Code :
$publisher = "SRV-ONECMR" $RMOserver = New-Object ('Microsoft.SqlServer.Replication.ReplicationServer') -argumentlist $publisher -ErrorAction Stop $RMOserver.ReplicationDatabases['Arizona'].MergePublications['Arizona_OU'].MergeArticles | select *
SQL Code:
SELECT a.Name, a.objid FROM Arizona.dbo.sysmergearticles AS a
I have some clients using Merge Replication. They may not replicate for a few days at a time which could result in thousands of Updates & Inserts been needed. This could be any thing from 100,000 to 500,000 records.Needless to say this can take a long time , and more often than not will fail.
Is there anything I can do to help the situation and improve performance ?
Is it worth looking at Web Synchronization - would this be quicker or slower ?
Ant thoughts would be appreciated.
david
Hi Experts,
Have you run into this kind of error before (MSSQL_REPL20046)? I couldn’t find any useful info regarding this error on Google. The strange thing is sql server didn’t give any error description associated with it. Below is the error log:
Command attempted:
if @@trancount > 0 rollback tran
(Transaction sequence number: 0x0001A9E10003888A000600000000, Command ID: 1)
Error messages:
(Source: MSSQL_REPL, Error number: MSSQL_REPL20046)
Get help: http://help/MSSQL_REPL20046
As usual troubleshooting, I ran the below query against distribution db. Strange: It return nothing.
sp_browsereplcmds'0x0001A9E10003888A000600000000','0x0001A9E10003888A000600000000';
This error happens on 3 publications and and spit out this error quite frequent (every 30 to couple hours). Most of the time, the distribution agent job just restarted itself and continue on, but sometimes the job just stop and waiting for DBA to manually restart it.
I added this error number into the distribution agent job with option –SkipErrors 20046, but it didn’t seem to work.
Both publisher and subscriber are sql 2014 ent with 'Pull' subscriptions.
Thanks,
Thanh Nguyen
ThanhNguyen
Hi guys, I have a partially contained database and I need to replicate transactions that are committed on one table on one database to another table on a different database and different instance. In this scenario our team really want to work with a contained database but I need to be able to replicate transaction which is one of the limitations of contained database. Also using triggers to accomplish this is out of the question. What other option are there that can get me close of what I want to do?
Thank you in advance
I am in need of some help (Ok, a lot of help). We had an issue where our SQL Server is another State went down and replication was broken (over a week out). The server has been fixed however; the replication would be too large to reinitialize across to the
SQL server located at another facility (bandwidth would not handle 680GB). I have created a new snapshot the previous evening to an external drive and shipped overnight. Replication has been stopped so the job is not running. The drive is at the other facility
today and I have the unc folder, .idx, .sch, .pre, and the .bcp files. What steps do I need to take to restore these files to the subscriber server?
I have moved all files from the external drive to a local partition to speed things up and not use the USB for the restoration.
Any help would immensely and greatly appreciated!
Hello,
I have many replications/publications on one server, each of those replications/publications was set up and of a concern of one SQL Server Agent Operator.
I want to alert each operator when his/her replications/publications fails or retires.
If I just enable [Replication: agent failure] and [Replication: agent retry], the operator selected in the [Response] tab will be emailed when any replication/publication fails or retries.
What I want is that if a replication/publication [AP] agent fails/retries, to alert just operator [AO] and not any other operator. And if a replication/publication [BP] agent fails/retries, to alert just operator [BO] and not any other operator.
Is this doable? if yes, how?
Thanks in advance :)
Guys,
I have a SQL high Availibility cluster. I'm usign it for Sharepoint 2016. Meaning I don't know wich SQL will be respond.
I want to use the Rblob feature build in in SQL (Filestream) but want a single location of data.
DO you think this below will work :
on a file server creating a \\Shares.
On both VM hosting SQL creating a mapping X:\\ to the UNC \\Shares
THen in both SQL pushing the x:\\Sharepoint as single location.
Do you think all the data will be correctly copy and that the user in Sharepoint will not have any problem.
If this is not working can you please help me to find a solution ? do we need to go for avepoint costly software ?
Thx
Christian
Hi All,
I have a doubt is it possible to replicate view in server 1 to table in server2 in SQL replication.
Hi Friends,
I have a transactional replication setup in SQL server 2008. There are already so many publications configured.
Recently a new table whose schema is different from dbo was added as an article to existing publication using sp_addarticle stored procedure
exec sp_addarticle @publication = N'publication_name', @article = N'articlename', @source_owner = N'abc', @source_object = N'tablename', @type = N'logbased', @description = N'', @creation_script = N'', @pre_creation_cmd = N'truncate', @schema_option = 0x000000010200008F, @identityrangemanagementoption = N'manual', @destination_table = N'tablename', @destination_owner = N'abc', @status = 24, @vertical_partition = N'true', @ins_cmd = N'CALL [abc].[sp_MSins_abctablename]', @del_cmd = N'CALL [abc].[sp_MSdel_abctablename]', @upd_cmd = N'SCALL [abc].[sp_MSupd_abctablename]'
Above script did not throw any error. I can see the article was added to the publication, but when i look at the new article's properties, the insert,update,delete call stored procedures where mapped like these , but i can't find them in the subscriber DB also.
[dbo].[abc].[sp_MSins_abctablename], [dbo].[abc].[sp_MSupd_abctablename], [dbo].[abc].[sp_MSdel_abctablename]
Also now my distribution agent job is failing with below error,
DROP PROCEDURE' does not allow specifying the database name as a prefix to the object name. (Source: MSSQLServer, Error number: 166)What could be the reason and resolution for this. Does sql server tries to drop these call procedures before trying to create them, what is the way i tell sql server that these procedures has to be created as [abc].[sp_MSins_abctablename] and not as [dbo].[abc].[sp_MSins_abctablename].
Thanks