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

Deadlock occured on Transactional Replication

$
0
0

Hi All,

If distribution agent is failed due to occured deadlock on transactional replication and data is not going from source to destination. Genarally if deadlock occured automatically sql server kills that process, hence if deadlock issue has resolved. Can any one explain what is the next step, is it require to start distributor agent or any other process should we follow.


Raveendra


Replicating alter stored procedure in MSSQL 2000

$
0
0

I am trying to replicate alter procedure in MSSQL 2000 , but they are not replicating. I have published the stored procedure as an article but altering it on production using alter procedure doesnt change it on replicate site...any ideas ? is this possible..i am using SP4 for SQL 2000

Merge replication reusing ID's

$
0
0
I am totally new to replication. I'm moving a web server to collocation and am replicating with the server at our main site. I'd like to go with Merge replication so the website can operate in the event the VPN that ties the servers together goes down. So the other day I set things up and everything seemed to be working great, until at random the publisher started reusing identity values that had already existed. It was not consistent, and the values where all over the place... not sequential. Any idea whats up? What stored procedures may shed some light on this?

Microsoft.SqlServer.Replication.dll not found

$
0
0

Hi Everyone,

I have a scenario where I have a publication ready for merge replication. I have also created the Subcribers. 

Now I want to write a small C# application to get my data synchronized using RMO objects.

But unfortunately I am unable to find Microsoft.SqlServer.Replication.dll.

In my server I have SQL Server 2008 R2.

And all my subscriber systems have SQL Server 2008 R2 Express Edition installed.

Now where can I find the Microsoft.SqlServer.Replication.dll

Thanks

Prabhanjan


Prabhanjan Kumar Mahapatra

Oracle Publication Truncated Commands in sp_browsereplcmds

$
0
0

I have set up an Oracle transactional publication on a single table as a test. Snapshot works ok so i assume we have good data mapping. However the replication is failing on update. When i try to view the failing command,  using sp_browsereplcmds, it is truncated. .

sp_MSupd_BULLPERSON" (62,'Mr','FRANK','Q','SPENCER',12345,NULL,'678910','M','1939-09-13 00:00:00','M',NULL,NULL,NULL,NULL,'2013-01-18 14:10:36',NULL,NULL,NULL,NULL,NULL,'   --missing parameters here.

This makes it impossible to test the sp_MSupd_Table command and isolate any problem field which is causing the update to fail.  If i look directly into theMSrepl_commands table the command is encoded. Looking in the sp_browsereplcmds script i see sp_printstatement @query which i assume translates the coded command - is this truncating the command ?

The error shown in the replication monitor does not reveal which field i need to look at

I created a smaller publication so that the entire update with all parameters is visible. this works fine. For the same update it gives no error. Consequently i don't know it there is an errant data mapping in the larger publication or even if the larger publication is sending a truncated command!

Any help appreciated.  

Z

No Data in MSMerge_Contents or MSMerge_tombstone corresponding to records in MSMerge_genhistory

$
0
0

I have several rows in the msmerge_genhistory table for which there are no corresponding records in MSMerge_Contents or MSMerge_tombstone tables based on the generation and art_nick values.

Is this normal?

There were even some records in the msmerge_genhistory table that had changecount value like 35000, but there were no records in the MSMerge_Contents or MSMerge_tombstone tables corresponding to those.

If there are no records in the MSMerge_Contents or MSMerge_tombstone tables, should the changecount value in msmerge_genhistory not be 0?

This is on SQL Server 2008.

Appreciate all the inputs.


Transactional Replication Query Timeout Expired

$
0
0

Hello,

I am getting the timeout expired error with a transactional replication distribution agent. The problem was that there are about 16 millions unreplicated commands in the Msrepl_commands table. The QueryTimeout was increased from 1800 to 7200 in the distribution agent profile. But it kept getting the message "The process is running and is waiting for a response from the server.".

I tried to modify the distribution.sys.sp_MSget_repl_commands but it said it did not exist. Is there a way to pass in the @read_query_size? From the SQL profiler, the command is

exec sp_MSget_repl_commands 7,0x000011B00001224A005900000000,0,10000000

Ideally if I could change the sp_MSget_repl_commands or the @read_query_size so that the distribution agent could start with a small number of commands to replicate.

Any suggestion is appreciated.

Thanks a lot,

Frank Yu


Can't get pull subscription working.

$
0
0

SQL Server 2008 R2 - SP2 - Windows 2008 R2, Windows 2003 SP2.

I am trying to setup a Transactional pull subscription from a second SQL Server but can't get it to work. I have tried setting it from the publisher server or the subscription server but no luck. I thought I have the userid issue and used sa to connect to distributor but still no luck. I am not restoring the database on the subscription server, I am creating a new one.

I have created multiple snapshots, tried reinitializations, syncronizations and all but no luck. What am I missing ?

I did get the push subscription to work.

Thanks



Please Help!!! Does anyone know exactly what sp_changesubstatus @status=inactive does?

$
0
0

We are migrating a subscriber DB to a new server, and it is re-publishing 2 days worth of commands.

I read in an old checklist here that someone ran these commands to clear all PUBLISHED and UNPUBLISHED commands for a subscription, possibly to prevent this from happening?:


EXEC sp_changesubstatus @publication =  'zz_OLTP_Transactions'

EXEC sp_changesubstatus @publication =  'zz_OLTP_Transactions'

,@subscriber =  'z89'

,@status     =  'active'

GO

I have heard that these are very dangerous to run. Does anyone know exactly what the "status=inactive" command does?

Thanks.

,@subscriber =  'z89'

,@status     =  'inactive'

GO

Transactional Repl. Initial Snapshot applying continuously

$
0
0
Hi everyone and thanks in advance for your time.

I have the following configuration.

Publisher SQL Server 2000 SP4

Distributor SQL Server 2008 R2 SP2

Push Subscritor SQL Server 2008 R2 SP2.

My publication is very large (about 300 Gb).

taked the snapshot without problems in more than 48 hours in concurrent mode. 

During that time more than 12 Gb of modifications captured in distribution db.

When the initial snapshot finish, the distribution agent begins to apply it to the subscriptor. After four hours it end the bulk-insert commands and finish of apply the rest of scripts, but it seems never begins to apply the captured modifications because is starting to apply the snapshot one more time (and so on).

Any idea?. I would not like to take the snapshot one more time (it lasts more than 2 days) and my distribution database keeps growing.

Thank you so much.

Reset auto identity range

$
0
0

Hi

I need to import data from an old replicated database, and keep the identity columns.
The data is to be imported to a new database that is replicated to a set of subscribers.

The identity ranges for each subscriber for each table is different in the old database and the new database.

* Is it possible to set the assigned ranges in the new database to be equal to the ranges in the old database, and reset next available id for each subscriber?
* Is it possible to reset the identiy ranges in the new database for all subscribers to ensure the ranges starts on a higher id then max id in the old database?
   (for example max id + 1000 for subscriber 1, max id + 2000 for subscriber 2 etc)

The identities should still after the change be managed automatically.
(SQL Server 2008 R2)

best regards
Johannes

The replication SnapShot agent Failing

$
0
0

We are consistently getting the error message below on our subscribers that have blob images. Is there a way to increase a setting to avoid SQL to throw this error, or another suggestion? Thanks in advance.

 Version:-SQL server 2005 SP4

Error messages:

The replication agent has not logged a progress message in 10 minutes. This might indicate an unresponsive agent or high system activity. Verify that records are being replicated to the destination and that connections to the Subscriber, Publisher, and Distributor are still active.

Aprroch followed but not wokirng

I have approx 40 Publisher and subscriber but it didn't happend beofore.

I have laso tried to cahnge the Heratbeat_intervel via  sp_changedistributor_property

I have alos tried to re-create the relications and even for ANY publisher snapshot agent is not working.

tried to check the bloking also

could some one please try to give me the exact solutions.

Thanks

Ekbal


EA


Subscriber Cannot Update in Transactional Replication

$
0
0
Hello,

I set up a queued updatable push subscription for transactional replication between two SQL Server 2005 boxes. When the Subscriber updated one of tables, it returned the following error:

Msg 14126, Level 16, State 3, Procedure sp_check_sync_trigger, Line 28
You do not have the required permissions to complete the operation.
Msg 20512, Level 16, State 1, Procedure sp_MSreplraiserror, Line 8
Updateable Subscriptions: Rolling back transaction.
Msg 3609, Level 16, State 1, Procedure <my stored proc>, Line 65
The transaction ended in the trigger. The batch has been aborted.

The account I used is already sysadmin role. Did I miss something else?

Thanks a lot,

Frank


Merge Replication with SQL Server 2012 and 2008 R2 Express

$
0
0

Hello,

I have a standard SQL Server installation of 2012 with a Merge Publication on a server (win2008).  I have a laptop with sql 2008 R2 express installed.  When trying to create a subscription to the 2012 publication, I get an error message "For merge publication, the version of the subscriber must not exceed the version of the Publisher".  However, I am not.  The subscriber is 2008 R2, and the publisher is 2012.  Any ideas?

Replication Validation results

$
0
0

We have transactional replication working on sql server 2008.  Our Publisher and Distribution database reside on P2 our data is being replicated to P1 via Pull Subscriptions.

We have several tables that have only their schema replicated and for those tables I have set filters so that the tables always remain empty even when loading a new snapshot.  

My question is about validation.  When I run validation these (schema only) tables seems to  pass validation even though one table has records in it and the other is empty.  Is this by design or is there something wrong with my configuration that is causing this?  I need to explain to management why validation reports successful on tables whose data is not getting replicated.  It makes them question the accuracy of the replication overall.

Any ideas/pointers to explanations would be appreciated.

 


Build sql server in DR site

$
0
0

Hello,

i have 2 sql server instance each instance in one sever i want to build DR site and replicate data file using storage replication .

any help to build this ? 

Upgrading from SQL Server 2008 to R2 or SQL Server 12

$
0
0

Here is my situation...

I've got three databases formatted as SQL Sever 2008 databases running on SQL Server 2008 R2 installs. We are looking at upgrading two of these databases to R2 or outright upgrade the databases and servers to 2012.

Currently we have transactional replication working between an application database that is SQL Server 2008 (not R2) and another db that is also SQL Server 2008 (not R2). Are there any potential problems that can occur with the replication process if we upgrade the subscriber database to 2008 R2 or 2012?

Thanks for any help.

Log Reader Repl Fail - Cannot exec sp_replcmds

$
0
0

Hello everyone,

I have a system that is replicates data from a 2005 instance to a 2012 instance of sql server.  We setup transactional replication a couple of weeks back and it has been running fine until yesterday.  Yesterday, we start getting errors on the log reader (list below).  Error seen below. What is odd to me is that we are still getting data replicated, albeit, with a large latency.

Message
2013-01-21 17:08:51.658 Status: 4, code: 20262, text: 'Delivering replicated transactions, xact count: 65,  command count: 17801.'.
2013-01-21 17:08:51.658 Status: 4, code: 20262, text: 'Delivering replicated transactions, xact count: 65,  command count: 17901.'.
2013-01-21 17:08:51.674 Status: 4, code: 20262, text: 'Delivering replicated transactions, xact count: 65,  command count: 18001.'.
2013-01-21 17:08:51.674 Status: 4, code: 20262, text: 'Delivering replicated transactions, xact count: 65,  command count: 18101.'.
2013-01-21 17:08:51.674 Status: 4, code: 20262, text: 'Delivering replicated transactions, xact count: 65,  command count: 18201.'.
2013-01-21 17:08:51.674 Status: 4, code: 20262, text: 'Delivering replicated transactions, xact count: 65,  command count: 18301.'.
2013-01-21 17:08:51.674 Status: 4, code: 20262, text: 'Delivering replicated transactions, xact count: 65,  command count: 18401.'.
2013-01-21 17:08:51.689 Status: 4, code: 20262, text: 'Delivering replicated transactions, xact count: 65,  command count: 18501.'.
2013-01-21 17:08:51.689 Status: 4, code: 20262, text: 'Delivering replicated transactions, xact count: 65,  command count: 18601.'.
2013-01-21 17:08:51.689 Status: 4, code: 20262, text: 'Delivering replicated transactions, xact count: 65,  command count: 18701.'.
2013-01-21 17:08:51.689 Status: 4, code: 20262, text: 'Delivering replicated transactions, xact count: 65,  command count: 18801.'.
2013-01-21 17:08:51.689 Status: 4, code: 20262, text: 'Delivering replicated transactions, xact count: 65,  command count: 18901.'.
2013-01-21 17:08:51.705 Status: 4, code: 20262, text: 'Delivering replicated transactions, xact count: 65,  command count: 19001.'.
2013-01-21 17:08:51.705 Status: 4, code: 20262, text: 'Delivering replicated transactions, xact count: 65,  command count: 19101.'.
2013-01-21 17:08:51.705 Status: 4, code: 20262, text: 'Delivering replicated transactions, xact count: 65,  command count: 19201.'.
2013-01-21 17:08:51.705 Status: 4, code: 20262, text: 'Delivering replicated transactions, xact count: 65,  command count: 19301.'.
2013-01-21 17:08:51.705 Status: 4, code: 20262, text: 'Delivering replicated transactions, xact count: 65,  command count: 19401.'.
2013-01-21 17:08:51.721 Status: 4, code: 20262, text: 'Delivering replicated transactions, xact count: 65,  command count: 19501.'.
2013-01-21 17:08:51.721 Status: 4, code: 20262, text: 'Delivering replicated transactions, xact count: 65,  command count: 19601.'.
2013-01-21 17:08:51.721 Status: 4, code: 20262, text: 'Delivering replicated transactions, xact count: 65,  command count: 19701.'.
2013-01-21 17:08:51.721 Status: 4, code: 20262, text: 'Delivering replicated transactions, xact count: 65,  command count: 19801.'.
2013-01-21 17:08:51.721 Status: 4, code: 20262, text: 'Delivering replicated transactions, xact count: 65,  command count: 19901.'.
2013-01-21 17:08:51.721 Status: 4, code: 20262, text: 'Delivering replicated transactions, xact count: 65,  command count: 20001.'.
2013-01-21 17:09:21.361 Status: 2, code: 20011, text: 'The process could not execute 'sp_replcmds' on 'DB15'.'.
2013-01-21 17:09:21.361 The process could not execute 'sp_replcmds' on 'DB15'.
2013-01-21 17:09:21.361 Status: 2, code: 64, text: 'TCP Provider: The specified network name is no longer available.'.
2013-01-21 17:09:21.361 Status: 2, code: 64, text: 'Communication link failure'.
2013-01-21 17:09:21.361 Status: 2, code: 10054, text: 'TCP Provider: An existing connection was forcibly closed by the remote host.'.
2013-01-21 17:09:21.361 Status: 2, code: 10054, text: 'Communication link failure'.
2013-01-21 17:09:21.361 Status: 2, code: 10054, text: 'TCP Provider: An existing connection was forcibly closed by the remote host.'.
2013-01-21 17:09:21.361 Status: 0, code: 22037, text: 'The process could not execute 'sp_replcmds' on 'DB15'.'.


From what I see in the error above, this really looks more like a networking error.  However, my network admin team is telling me that there aren't any issues with the direct pipe that we setup between the two replicated instances.  

I am wondering if it is possible that there is an issue with a specific log section that might be causing errors, and if so, how do I figure out what is happening and the LSN that is causing the issue as it isn't listed above.  If I had the LSN, I have a script to find the command being used.

Thanks for the help everyone.

Nathan

Deadlock in SQL replication

$
0
0

I have a transactional PULL replication on SQL 2008,I hv created individual publisher and subscriber for every article.

In my replication monitor my most of the subscribers are showing status

        'Retrying Failed Command'

and details r given that

'transaction was deadlocked on lock resources with another process and has been chosen as the deadlock victim ' 

when I chk d errorlog it gives me table "MSreplication_subscriptions" where all deadlocks are occurring while updating.

Even I rebuilt the indexes on that table but no effect.

Kindly suggest on the same.

Synch two SQL DB

$
0
0

Env: SQL Server 2008 R2

We have two SQL Databases used by two different applications.We need to synchronize some of data between these databases.Both the databases are in Read/Write mode and database structure may be different at source and destination. Records should be synchronized as soon as any DML statement is fired on any of the database. What are the tools/techniques available to achieve this.

Thank

Viewing all 4054 articles
Browse latest View live


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