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

Can a bad VPN comunication damage a merge replication ?

$
0
0

Hi All

I have had problems with a sql server 2012 with 2 suscribers and a merge replication in the last weeks. I have had to reinitialize the suscriber 2 times and the only issue our technical staff have found is that te vpns we have with the 2 suscribers are loosing connection many time per hour. we are in the process to fix this problem but I'd like to know if this can be or could be the reason of the suscribers getting damage.

Thank you very much.


Merge Replication not creating the identity constraints at the subscriber

$
0
0

One of the article in Merge Replication doesnt propagate the Identity constraint to the subscribers. 

Any ideas appreciated. 


Thanks

- Kerobin


question on transaction replication

$
0
0
Hello,

I am using SQL Sevrer 2012 Standard Edition. I am using Transactional replication with publication, distribution and subscription all on one server which is server Y. Tables a,d,c,d,e,f  are being replicated from database1 to database2. now I want to bring another server Server X and setup transaction replication between Server X and Server Y and replicate tables a,b,c from database 3 on Server X to tables a,b,c on Server Y and still let the other replication run on Server Y between the same tables.

So for tables a,b,c on Server Y they are kind of subscribed tables for database1 from database 3 on server X at the same time publisher for database2 on server Y.

Is this possible?

SQL 2008 Snapshot Replication problem

$
0
0

Hi,

I have a snapshot replication to which I added a new subscriber. I have only one table with about 30 million rows. The distribution agent starts to insert the data but after about 1.8 million it fails with the following error message.

Error messages:
The process could not bulk copy into table <mytable>. (Source: MSSQL_REPL, Error number: MSSQL_REPL20037)
Get help: http://help/MSSQL_REPL20037
The system cannot find the file specified.
To obtain an error file with details on the errors encountered when initializing the subscribing table, execute the bcp command that appears below.  Consult the BOL for more information on the bcp utility and its supported options. (Source: MSSQLServer, Error number: 20253)
Get help: http://help/20253

Do you have any suggestion how to locate the problem?

Thanks.

P.

Transition from SQL server 2000 to SQL server 2014

$
0
0
Hello All,

We're in the process of moving our SQL server 2000 to SQL server 2014. I've created a new instance on the SQL server 2014 along with the linked server to SQL server 2000. It's going to be a slow transition from SQL server 2000 to SQL server 2014. I've few questions regarding the same:

1) I need to regularly insert/update the data in the new database on SQL server 2014 from the old (SQL server 2000) until we fully transition to the new server (SQL server 2014). Can somebody please share their experience/inputs? Will be really helpful to start with.

2) The next step is to encrypt the data (few columns) on the new sql server 2014 as and when data gets inserted. However, my priority remains the first step to get the insert working on the new SQL server.

Any help is greatly appreciated.

Thanks, again

populating local database daily with data from linked servers

$
0
0

I'm not sure if replication is the right forum for this question, but my scenario is as follows: 

I have multiple web databases for storefront orders as linked servers on SQL Server 2008 R2. I need to organize the data for these orders into a structure that can be imported into my ERP application db frequently either on demand or periodically during the day. We are essentially trying to make the manual order entry process automated. My thought was to get the data into views that resemble the schema of the order table in my application db and then schedule a stored procedure with sql jobs or a load routine from within the ERP application that would insert data from the view into the order table. Am I on the right track here or are there better ways of achieving what I want? 


Is Oracle to SQL Replication Still Supported in SQL Server 2012?

$
0
0

I'm confused, from 'https://technet.microsoft.com/en-us/library/ms151149(v=sql.110).aspx', 'Heterogeneous replication to non-SQL Server subscribers is deprecated. Oracle Publishing is deprecated. To move data, create solutions using change data capture and SSIS.', does 'Oracle Publishing is deprecated' mean Oracle to SQL replication is not supported any more in 2012?  or is it just talking about replication to non-sql server like Oracle and DB2?  I need to know if I can still set up Oracle to SQL replication in sql server 2012.

-Tae



tae yang

High CPU in a Transactional Replication

$
0
0

We are in SQL 2014 environment and there is a transactional replication of a publication containing only views (non indexed)

The Distributor is on a dedicated server and all of the Subscriptions are in PUSh mode.

CPU rises till the 90% and disabling this publication falls to the 10%.

I'm really wondering how a view publication can create such an high CPU load.

Any idea?

Thanks


Ruggiero Lauria
MCT-MCITP-MCSA-MCSE-MS SQL DBA


Subscription disappears

$
0
0

We set up an SQL Server 2012 Replication:

+ merge replication

+ push Subscriber (notebooks)

+ retention period 14-days

After some days (less then 14 days) one of the subscriber (notebook) can't replicate anymore. A review showed the following:
The subscription on the notebook has disappeared. An error message regarding this issue can't be found in the log.

We set up the replicate again and set the retention expiration (setting publication) up to 90-days. Deactivating the cleanup jobs regarding subscriber and distribution and testing again.
Result: The replication works fine for a few days. After a certain time (a few days) the subscription on the notebook has dissapeared again.

Maybe someone has a hint? Which other influences (except expiration time and cleanupjobs) are responsible for deleting a subscriber on the Notebook-side.



Thanks in advance (and please excuse my bad English)

Udo

Snapshot agent

$
0
0

Hi,

We configured a transactional replication and i is working fine.Some started the snapshot agent again and they stopped it in middle.It is completed only 50%.However,log reader agent is running successfully.

As per my knowledge,there would be no issue due to this change.I am not running it again because it will create a burden to our db.

Can someone let me know if there would be any  issue?

Merge Replication Next_Range_Starting_Value

$
0
0

Hello Experts,

I'm using merge replication on sql server 2008 R2 SP3. in one of my publications, for a table, Next_Range_Starting_Value went close to Int value. the data type of the column is Int.

we dont have those many records to reach that value, still a long jump happend in the identity values.

please could you suggest on how can I correct the next range starting value? i have an option of changing the data type to Big int, but that is not ideal. because, there is not those many records in the table.

please help.



Cheers, Vinod Mallolu

SQL Server Replication and 10GB Limit on SQL Express

$
0
0

Hello,

We have a database we are replicating to about 8 SQL Express subscribers from a SQL 2012 SP2 publisher.  The size of the database grew too large for the 10GB license limit for SQL Express and now replication refuses to replicate any of our deletions on the publisher to reduce the size of the database.  I've come up with a few options below.  Is any one of them a good course of action? (or something else?)

1) Drop one of the larger table indices on the subscriber database to get below the size restriction. Permit the replication to replicate the deleted records and then rebuild the index.  (I'm not sure how important an index is to this table.  Is it merely performance related?)

2) "Upsize" SQL Express to SQL Standard on the affected boxes.  Allow the deletes to replicate.  Backup the database, downgrade to SQL Express and restore the database back to SQL a new SQL express instance.  This would involve a lot of work on each box. I'd like to avoid it if possible.

Thank you for your time!

Matt

Trans Repl: SQL 2005 to SQL 2008

$
0
0

Hi,

We're in transition again and I need to establish replication as above.  Got my Distributor set up and Publication.  When I try to add the subscription I get an error saying

"Failed to connect to server ""   "

"The SQL Server version (10..0) is not suppored"

Thought it was supported... is there some special configuration to get this to run?

Thanks for any/all help.

Tom

What's the best way to migration Oracle to SQL replication (Distributor and Subscriber Databases)?

$
0
0

We are going away from a 2003 Windows Server OS with SQL Server 2008 R2 to a 2012 Windows Server with 2012 SQL Server. Both the distributor and subscriber resides on 2003 Windows Server and the focus will be to migrate those databases to the 2012 SQL Server. We would also like to avoid sending down a new snapshot due to logic in the replication process (major headache to clean up data).  With that said, what's the best approach in moving the distributor and subscriber databases without having to run a snapshot?  

In theory and needs testing:

1. Work with business users to get downtime

2. Stop sql apply so no new changes are going to the Oracle publisher database

3. Remove subscription, publication and distributor from current replication

4. Oracle DBA to clear out replication related objects - fresh clean slate

5. Use log shipping to apply last t-log and restore db with Keep_Replication

6. Set up new distribution, publication (keep existing object unchanged), and subscriber (without initialization)   

Will this work?

- Tae


tae yang

A replication agent encountered a fatal error and was shut down.

$
0
0
************************ STATISTICS SINCE AGENT STARTED ***********************
07-29-2015 12:09:48

Total Run Time (ms) : 21610242     Total Work Time  : 4144735
Total Num Trans     : 1825     Num Trans/Sec    : 0.44
Total Num Cmds      : 6087828     Num Cmds/Sec     : 1468.81
Total Idle Time     : 14496099

Writer Thread Stats
  Total Number of Retries   : 0
  Time Spent on Exec        : 2986816
  Time Spent on Commits (ms): 33412     Commits/Sec         : 0.39
  Time to Apply Cmds (ms)   : 1383541     Cmds/Sec            : 4400.18
  Time Cmd Queue Empty (ms) : 3986532     Empty Q Waits > 10ms: 2944
  Total Time Request Blk(ms): 18482631
  P2P Work Time (ms)        : 0     P2P Cmds Skipped    : 0

Reader Thread Stats
  Calls to Retrieve Cmds    : 2907
  Time to Retrieve Cmds (ms): 4144735     Cmds/Sec            : 1468.81
  Time Cmd Queue Full (ms)  : 2959515     Full Q Waits > 10ms : 51412
*******************************************************************************

2015-07-29 04:09:48.030 <stats state="2" fetch="4075" wait="3028" cmds="109" callstogetreplcmds="2907"><sincelaststats elapsedtime="1800" fetch="0" wait="1800" cmds="109" cmdspersec="0.000000"/></stats>
2015-07-29 04:09:48.039 <stats state="1" work="4144" idle="14496"><reader fetch="4075" wait="3028"/><writer write="1383" wait="3986"/><sincelaststats elapsedtime="1885" work="0" cmds="15" cmdspersec="937.000000"><reader fetch="0" wait="1800"/><writer write="5" wait="0"/></sincelaststats></stats>
********************************************************************************
Microsoft (R) SQL Server Replication Agent

A replication agent encountered a fatal error and was shut down. A mini-dump has been generated at the following location:

C:\Program Files\Microsoft SQL Server\100\Shared\ErrorDumps\ReplAgent20150729120950_0.mdmp

Replication not replicating fast enough (Replication Transaction Rate is low?)

$
0
0

Hello

Im hoping someone can point me in the right direction.

I currently have transactional replication model and for some strange reason the Repl. Pending Xacts keep on increasing. They are currently at 20 million. Having restarted the distributor I noticed that the Repl. Trans. Rate is currently 0

Indeed, doesnt seem to be transferring any data. 

I assume this is because of a network latency between my publisher and my distributor which sit on different server machines.

Anyone help?

K

SQL Standard 2012 - Merge Replication - Improving performances

$
0
0

Hi,

Got a conundrum, we use SQL Standard in the following bi-directional merge replication scenario:

subscribtor <-LAN-> publisher <-WAN-> re-publisher <-LAN-> subscribtor

Identities are manually managed on each of the servers so that no collision can occur during replication. And I cannot modify the application at this time.

The old setup has just the 2 publisher in a single merge replication scenario. I thought that adding 2 more servers would help unload some of the writes especially since some tables are transient but still need to be replicated in case one side of the application crashes but not the other.

----

At the moment we are doing load testing as we are prepping a migration from 2005 to 2012. With the current production load the system copes barely and we start seeing deadlocks as well as merge replication being deadlocked on the WAN side. As this is in the test environment which has a fifth of the power of the future prod environment I am not that much bothered by it. At the moment this load represents up to 10 000 writes and I guesstimate about 10 times that in read every minutes per server. So around 40 000 writes a minute overall.

However I still want to improve things so that we can handle a few times the amount above before starting to see deadlocks. For instance I had hopped to filter the table so only 10 minutes dated data would be replicated though the links as we don't require real time synchronization. But as getutcdate is non deterministic, can't use it in a filter or pre-computer partitions.

----

So, is it possible to only send data in a merge replication that is dated in the past ? Lots of timestamp in the tables so it be perfect.

Is it also possible to not lock whole tables in the merge replication process so that for instance inserts can still happen ? I do have a few table that only get inserts.

---

Thanks,

Merge Replication Error-call to MSmerge_ins_sp and MSmerge_upd_sp calls produces Implict Conversion Datatype errors?

$
0
0

Hi all,

Hoping someone has some advice on this specific error.

Background info

I have a read-only subscription for an article "quote" and it keeps retring to insert and update 20 odd records. When I put a trace on and track down the offending code its looking like its calling the stored procedures with incorrect parameters causing a datatype conversion error?

The resulting error is a

"The merge process is retrying a failed operation made to article ''quote'' - Reason: ''Implicit conversion from data type varchar to varbinary is not allowed."

Here are some example calls which fail when I call them manually

exec [dbo].[MSmerge_ins_sp_649622254F6B4EDE6845A21483954514] 'E15E798F-8423-E511-9403-40F2E9249F9A','22',90952,1313767,737439,'','martini',NULL,NULL,NULL,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,6,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'robrown','2015-07-06 10:13:16','robrown','2015-07-06 10:13:16',385807,NULL,NULL,'','','','',NULL,NULL,NULL,NULL,'','  ',NULL,NULL,'E15E798F-8423-E511-9403-40F2E9249F9A',NULL,0,NULL,NULL,NULL,NULL,NULLan

and an update

exec [dbo].[MSmerge_upd_sp_649622254F6B4EDE6845A21483954514] 'B709A45F-DA22-E511-9403-40F2E9249F9A',0xC0F9FF7F7F303CEB030000000000000000000000000000000000000000000000,'03',24572,1313672,737315,'','cherbert',NULL,NULL,NULL,11,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'cherbert','2015-07-05 13:55:01','cherbert','2015-07-06 10:13:39.4900000',NULL,NULL,'','','','',NULL,NULL,NULL,NULL,'','  ',NULL,NULL,'B709A45F-DA22-E511-9403-40F2E9249F9A',NULL,1,NULL,NULL,NULL,NULL,NULLI have

I have ran into this error a few times and am getting sick of redeclaring the article to amend.

Any advice appreciated as always.

Kind Regards,

Matt

Merge Replication - Delete Operation Failure on Subsciber reported as "This failure can be caused by a constraint violation. Unable to synchronize the row because the row was updated by a different process outside of replication."

$
0
0

Hi all,

The merge replication on the table in question works fine for Updates and Inserts which I can see in replication monitor but when deletes occur I get this error when merge replication tries to delete the row on the subscriber.

Please note that below is a screenshot showing that referenced objects for deletions are correct and I have verified that the objects are present etc , all of that look Ok.

I tracked through the objects and tried to manually recall replication to deleted the row on the subscriber with the call

exec

[dbo].[MSmerge_del_sp_F76ED4C8192B4AA26845A21483954514]1,null,'820f2006-1529-e511-9403-40f2e9249f9a'

and that went through with no error and it looks like replication is no longer retrying to run the delete and subsequently causing another conflict to tick for this row.

My question is, having a look at the tombstone records below (Publisher is first and then the Subscriber) given that the generation and lineage are different, is this the cause?

Like I said Inserts and Updates go through to the subscriber with No issue and work fine, its just when delete operations get called it seems that this error gets raised.

Any advice appreciated.

Kind regards,

Matt


Alter Column length of a composite PK of a table Throwing error in few cases and OK to alter in few other cases on both PUB &SUB

$
0
0

Hi,

I have a PK clustered (PK_VisitConditions) on table X 

PK_VisitConditions has column keys as (VisitID,ConditionID) both are varchar(50) datatype 

VisitID collation SQL_Latin1_General_CP1_CI_AS

ConditionID collation SQL_Latin1_General_CP1_CI_AS

now i have to increase the ConditionID from varchar(50) to varchar(250) 

When i run the alter statement :

ALTERTABLE X ALTER COLUMN ConditionID varchar(250) 

The column length is changed on the publisher but Sql Server Replication is showing  me an error in the replication monitor i.e Distributor to Subscriber history  saying that 

The object 'PK_VisitConditions' is dependent on column 'ConditionID '.
ALTER TABLE ALTER COLUMN ConditionID  failed because one or more objects access this column.

and the column change is not reflected at the subscriber .

But in few other cases similar to  this the replication is able to propagate the PK column length changes both to publisher and subscriber .

Can someone please throw some light on what i am missing.

Thanks,

Jack


Viewing all 4054 articles
Browse latest View live




Latest Images