.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Updatable Transactional replication, Queue Reader error

Posted By:      Posted Date: October 25, 2010    Points: 0   Category :Sql Server

I have just started getting the following error from the queue reader but I can't see why.


The Queue Reader Agent has encountered the error 'Row handle is invalid.' when connecting to 'Database' on 'ServerName'. Ensure that the publication and subscription are defined properly and that both servers are running.


Does anybody know what it means / how I can fix the problem?



View Complete Post

More Related Resource Links

Transactional Replication with Updatable Subscribers Error

I am trying to implement Transactional Replication with Updatable Subscribers across two different Servers.

DB_P is the Publisher database on Server1.
DB_S1 is the Subscriber database on Server2.
DB_S2 is the Subscriber database on Server1.
DB_S3 is the Subscriber database on Server2.

SQLSERVER services are enabled as NETWORKSERVICE. MSDTC is enabled on both servers. Checked RPC call via DTCPing.

After setting up Distributor, Publisher and Subscriber, when I execute sp_link_publication statement on the Subscription database (DB_S2) which is on same Server as of Publisher database (DB_P), it works fine.
But when I execute sp_link_publication statement on the Subscription database (DB_S1 and DB_S3) exists on Server2 it gives me the following error:

OLE DB provider "SQLNCLI10" for linked server "REPLLINK_SERVER1\-1468339317_PEGASUS2_A-1570475579_DBPUP369101659_DB_S-1726189269" returned message "No transaction is active.".
Msg 7391, Level 16, State 2, Line 1
The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server "REPLLINK_SERVER1\-1468339317_PEGASUS2_A-157047

Transactional Replication Error

I have setup  Transaction Rplication on SQL Server 2008 with skiperror paramters true on distribution agent.When I get the error in the monitor it says it skipped the error .But is there anyway I can see the exact error?

log reader agent stopped in transactional replication


hello frnds

I got this error in transactional replication in sql server

Error:The process could not execute 'sp_repldone/sp_replcounters' on 'FS001XSSQL110'. (Source: MSSQL_REPL, Error number: MSSQL_REPL20011)

Get help: http://help/MSSQL_REPL20011

The log scan number (54862:18189:10) passed to log scan in database 'Affinity' is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup. (Source: MSSQLServer, Error number: 9003)

Get help: http://help/9003

The process could not set the last distributed transaction. (Source: MSSQL_REPL, Error number: MSSQL_REPL22017)

Get help: http://help/MSSQL_REPL22017

The process could not execute 'sp_repldone/sp_replcounters' on 'FS001XSSQL110'. (Source: MSSQL_REPL, Error number: MSSQL_REPL22037)

Get help: http://help/MSSQL_REPL22037

this is what i am getting when i viewed the log reader agent in replication monitor.



Replication Log Reader Agent Error - No Information


SQL Server 2005 SP3, I have created an Oracle Publication for transactional replication.  All seems to be working, even getting transaction updates from Oracle. In replication monitor Log Reader Agent status is "Error".  Last action is "applying retries....".  When I view details, window is empty - though once before (when I saw details), details told me to check job history.  Job history shows - "The replication agent encountered an error and is set to restart within the job step retry interval. See the previous job step history message or Replication Monitor for more information."

I understand that the Log Reader is moving data change info to distribution and it seems important to understand the errors.  The Log Reader agent is using the SQL Agent Service Account.

Log Reader Agent profile properties are default.

Here are details of error:

Details in job step message:

Date  10/29/2010 11:23:54 AM
Log  Job History (PULPDEV-PULPDEV-19)

Step ID  2
Step Name  Run agent.
Duration  01:06:07
Sql Severity  0
Sql Message ID  0
Operator Emailed  
Operator Net sent  

Transactional replication with updatable subscriptions makes log file huge...




 We are doing Transactional replication with updatable subscriptions. We need to create the replicated db on same server. The recovery model is simple. The original DB has been restored from sql2000. But when I do the replication, the publishercreation fails saying that the database recovery mode is set to full,the log file is full and try freeing up some space in thelog. I can also see the log file growing in size but if I check the recovery mode, it is still 'Simple'.  The log file becomes huge like 10GB and also I cannot truncate it as it has unreplicated txn. I have not tired taking Txn backups, in first place I do not need because recovery mode is simple and that would not truncate it as log file has unreplicated txn's in it.

I wonder how the db recovery mode is being changed to full. I have not seen this happening before when doing replication.

I tired repolicating small subset of tables, but I see two copies of th table in the replicated db, one is regauld table has all the info and the other on is conflict_table name, it does not have any data in it.  do not know why it is happening?


Help greatly appreciated!!



Linq2Sql error: "Invalid attempt to call Read when reader is closed."


I've read up on this error from other posts and on other sites, but haven't found a solid resolution to the issue yet. My setup is as follows:

I have a RepositoryBase class that fields certain db calls that all repositories need to perform. In one such call, "GetSecurityGroup", it works most of the time, but will seemingly at random throw an exception with the error "Invalid attempt to call Read when reader is closed." All other Repository classes inherit from this one, and they all use the same DataContext object, which I understand isn't thread safe. Since there could be multiple calls to the DataContext object on the same page, perhaps one is using the DataContext when the next tries to do so. I'm not sure. What can I do to ensure this doesn't happen?

Transactional replication: Updates to one of my columns (sometimes) does not get replicated from the

hi, This is my scenario: I have a varchar(max) column on a table that is replicated to other servers. I have a stored procedure that does and update to this column and other columns on the table. This is done inside a transaction that also includes other updates. When I call the stored procedure, this one varchar(max) column's value is not replicated. When I just run the single update statement on its own, the value is replicated. Anyone know something about this? Thanks!    

transactional replication and sp_MSupd tables

Hi thre, My target server keeps running sp_MSupd sp for different values in profiler and synch status shows "delivering replication commands" I keep waiting but this never ends. and ultimately we run a snapshot and it can't be applied. So recreate the whole replication again. It runs fine for a while but again, the sp_MSupd sp starts running on the target server and the replication goes down again. I don't know how to fix this. any advices?   Regards

transactional replication falling behind. millions of transactions in sp_brosereplcmds

Hi, Hi All, we have transactional replication set up with all the agents running at source database. The synchronization status is stuck at "delivering replication transactions". The replication latency in replication monitor says excellent. when I check sp_browsereplcmds. it ever ends. It has over more than millions of rows of output. We were having trouble with this replciation recently because at the source db. they run a large batch. So we decided to schedule snapshot agent to run exactly after that batch but the snapshot doesn't seem to helping out with the latency. what should be done to resolve the issue. Please help. thanks.

Transactional Publication With Article Using DATE Datatype Causes Snapshot Agent to Fail with Error

So I am using SQL Server 2008 Enterprise Edition (64Bit) and have run into a strange problem that is baffling me. I have two tables that I need to replicate.  They are identical in specification except the name (one is for monthly stats and one daily stats) CREATE TABLE [dbo].[statsDailyLite]( [EntryDate] [date] NOT NULL, [SetID] [int] NOT NULL, [ProductID] [smallint] NOT NULL, [Hooks] [int] NOT NULL, [AdViews] [int] NOT NULL, [Clicks] [int] NOT NULL, [UAdViews] [int] NOT NULL, CONSTRAINT [PK_statsDailyLite] PRIMARY KEY CLUSTERED ( [EntryDate] ASC, [SetID] ASC, [ProductID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ) GO CREATE TABLE [dbo].[statsMonthlyLite]( [EntryMonth] [date] NOT NULL, [SetID] [int] NOT NULL, [ProductID] [smallint] NOT NULL, [Hooks] [int] NOT NULL, [AdViews] [int] NOT NULL, [Clicks] [int] NOT NULL, [UAdViews] [int] NOT NULL, CONSTRAINT [PK_statsMonthlyLite] PRIMARY KEY CLUSTERED ( [EntryMonth] ASC, [SetID] ASC, [ProductID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ) GO They both conatin a thousand or so test rows of data, and they are both in a transactional publication going to another SQL 2008 box. Now when the tables are empty

Error in Replication: connection was chosen as the victim in a deadlock

I'm using a merge replication with SQL 2008 at server and SQL Express 2008 on subscribers. We are using around 100 subscribers. I'm getting the following error once two subscribers replicate at the same time. The final number of transaction uploaded to the server is always arong 100 and a similar number in the downloads, so the amount of transaction is not an issue. I'he been playing with the merge profile with no luck. The merge process could not replicate one or more INSERT statements to the 'Publisher'. A stored procedure failed to execute. Troubleshoot by using SQL Profiler. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147200990) Get help: http://help/MSSQL_REPL-2147200990 A query executing on Publisher 'xxxxx' failed because the connection was chosen as the victim in a deadlock. Please rerun the merge process if you still see this error after internal retries by the merge process. (Source: MSSQLServer, Error number: 1205) Get help: http://help/1205 Any idea? This is getting to a critical point where transactions are not being uploaded to the server.  Additonally, there are a lot of blocks between the subscribers, and they are mainly associated with table MSmerge_partition_groups  

getting an e-mail notification when a transactional replication stucks

Hi all, I've SQL Server 2005 and a transactional replication scenario with one puplisher and 11 subscribers. Sometimes one of the subscriptions fails and a manual operation is required. Is there a way to get an e-mail notification whenever the replica fails or stucks or simply degrade its performances?

Transactional publication with updatable subscriptions in SQL Server 2005, SvPk 2

Subscription to "Transactional Publication with Updateable Subscriptions" works only one way.  Changes take effect on subscriber, but the subcriber is unable to update data on publisher.   I have Sanpshot Agent process running under SQL Server Agent service account with login 'sa.'  All agents are running at the Distributor (Publishing Server.)   The subscriber is unable to connect to the Distributor using the SQL Server login.    Following is the error message I get:   Creating Subscription(s)... - Creating subscription for 'SQL3' (Warning) Messages Unable to set the Publisher login for the updatable subscription. You may have to set this up directly on the Subscriber machine using sp_link_publication. (New Subscription Wizard)------------------------------ADDITIONAL INFORMATION:An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)------------------------------MSDTC on server 'SQL3' is unavailable.Changed database context to 'DB_SQL1_to_SQL3_on_3'. (Microsoft SQL Server, Error: 8501)For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3054&EvtSrc=MSSQLServer&EvtID=8501&LinkId=20476   Please suggest procedure to end this dilemma.  The link has no info available.

XML Column containing single quote causes replication error

We have SQL Server 2005 transactional replication set up, and some of our tables have XML datatype columns.  We have run into an issue with the following error in the publication: Incorrect syntax near 's'. (Source: MSSQLServer, Error number: 102) Get help: http://help/102 Looking at the distribution database, I was able to extract the offending command, and it turns out that the XML column has a single quote (') embedded in it, and the command that was generated for inserting the row into the subscriber table has bad syntax because of the single quote (i.e., it is not escaped).  One interesting note is that the single quote happens to also show up in a non-XML column, and the command segment for that column was generated correctly (it was escaped). Is there a workaround / solution for this?

error in merge replication

Hi ALL,      I have merge replication configured between republishers( sql 2008) and subscribers( sql 2000)...i am getting the following error while trying to sync   The merge process could not update the list of subscriptions. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201010) Get help: http://help/MSSQL_REPL-2147201010 Cannot insert duplicate key row in object 'dbo.sysmergesubscriptions' with unique index 'uc1sysmergesubscriptions'. (Source: MSSQLServer, Error number: 2601) Get help: http://help/2601 The subscription could not be created. (Source: MSSQLServer, Error number: 14057)   Any suggestions y i am getting this error TIA

Issue with transactional replication on SQL 2005 SP3 using row filters with bit columns

We recently upgraded from SQL 2000 to SQL 2005 SP3 and I am noticing something that I think is a bug with replication from a publication that has an article in it with row filters.  It seems to be that if the row filter has columns that are bit datatype and that column is updated on the publisher to cause the row filter to exclude it, it is not removed from the subscriber.  If you update a column that is part of the row filter that is not a bit datatype it works as expected.  I can reproduce this in a test environment with a small base table.  In production this is resulting in an occasional 20598 error "The row was not found at the Subscriber when applying the replicated command". Is anyone aware of a hotfix that addresses this? I can think of a few work arounds but the table is rather large and I really would like to avoid having to pull replication, re-snap or changing datatypes on the base table etc. Any suggestions are greatly appreciated.  Thanks!

Log Reader Error: The process could not execute 'sp_repldone/sp_replcounters'

I have transactional replication going between servers A and B. SQL Server 2005 64 bit A is Publisher B is Distributor and Subscriber Now I am getting the following Log reader Agent Error Msg The process could not execute 'sp_repldone/sp_replcounters' on 'A'. (Source: MSSQL_REPL, Error number: MSSQL_REPL20011) Get help: http://help/MSSQL_REPL20011 Only one Log Reader Agent or log-related procedure (sp_repldone, sp_replcmds, and sp_replshowcmds) can connect to a database at a time. If you executed a log-related procedure, drop the connection over which the procedure was executed or execute sp_replflush over that connection before starting the Log Reader Agent or executing another log-related procedure. (Source: MSSQLServer, Error number: 18752) Get help: http://help/18752 The process could not set the last distributed transaction. (Source: MSSQL_REPL, Error number: MSSQL_REPL22017) Get help: http://help/MSSQL_REPL22017 The process could not execute 'sp_repldone/sp_replcounters' on 'A'. (Source: MSSQL_REPL, Error number: MSSQL_REPL22037) Get help: http://help/MSSQL_REPL22037 Can anybody help me in solving this issue? I read that we have to delete the existing publication and subscription.  Is there any way to solve this problem without deleting the existing subscription and publication Any help would be appreciated Thanks
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend