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

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

Identity Range Value (Max Limit Finished) SQL Server 2005 (Merge Replication Problme)

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :Sql Server

Hi ,

I am using SQL Server 2005 enterprise edition, I Confirured the Merge Replication to my database). I have a replication of 21 database from various locations.

Problem is: When is trying to remove one subriction from the publisher and add a fresh subriciton to it. it is poping any error saying the Identity Range value exceed its Max Limit try to change from int to bigint. is there any solution for it not changing from int to bigint.

Thank you.


View Complete Post

More Related Resource Links

SQL Server 2005 Merge Replication

We did the following: We setup a database with all of standard tables, views, etc. We then put in place merge replication for a few of the tables within this database, including a tables called "Areas". We can execute SQL statements to insert rows into this table fine. We then applied an update script for this database to change a few tables by adding fields and changing indexes, etc.  We didn't change the "Areas" table though. After the update to the database structure, we get an error when trying to insert into this "Areas" table. The error message was the following: The insert failed. It conflicted with an identity range check constraint in database 'AETest', replicated table 'dbo.Areas', column 'AREPrimaryId'. 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.  The statement has been terminated.   What would cause such a problem and how do we resolve it?  The structure of the "Areas" table before and after the update is the following: USE   [AETest] GO /****** Object: Table [dbo].[Areas] Script Date: 08/24/2010 17:42:36 ******/ SET   ANSI_NULLS ON GO SET   QUOTED_IDENTIFIER ON GO SET   ANSI_PADDING ON

SQL Server 2005 Schema Replication in Merge Replication


Dear Sir,

I am using SQL Server 2005 Developer Edition for Creating & Testing Database.

I had created Merge Publication WITHOUT FILTERING ROWS and Created Push or Pull Subscription. Now if I Add or Drop column using ALTER TABLE (T-SQL) in Table OR modify stored procedure using ALTER PROCEDURE in Published Database then while Synchronizing It replicate same in Subscriber Database and works very fine.

But when I had created Merge Publication WITH FILTERING ROWS (Parameterize or Static) and Created Push / Pull Subscription and I try to Add or Drop column using ALTER TABLE (T-SQL) in Table  OR modify stored procedure using ALTER PROCEDURE in  Published Database then while Synchronizing It DOESN'T REPLICATE in Table of Subscriber Database but tries Replicate in Stored Procedure and display error.

After Adding Column in Table of Published Database, If I Checked Article in property of Publication then it Adds column but it doesn't selects it. I also checked using sp_enumeratependingschemechenges it displays pending schema changes of stored procedure but

Merge Replication between SQL Server 2005 and SQL Server 2008



We are planning to implement Merge Replication between SQL Server 2008 "Not R2 Version" (Publisher) and SQL Server 2005 (Subscriber). Will this setup work, or there are some limitations ?

SQL Server Mobile 2005 Merge replication failing over SSL, but can browse through pocket IE.


Hi All, this system is scheduled to go live in near to a day... but i have hit an issue when switching on SSL.  Any help would be greatly appreciated.


Device Env:

Windows Mobile 5.0 + Messaging and Security Feature Pack

SQL Server Mobile 2005.


Merge replication works fine without SSL.  After running the Configure Web Sync wizzard to setup SSL merge replication no longer works.  Note i checked using pocket IE by browsing to https://mycompany.com/pub/sqlcesa30.dll?diag and all worked fine.  There was no prompt saying the cert was bad etc.


The certificate is a:

Equifax secure global ebusiness CA-1 cert.

Signature algorithm md5RSA

public key RSA(1024 bits)

thumbprint algorithm sha1


Stacktrace given is:

-  ex {"A request to send data to the computer running IIS has failed. For more information, see HRESULT."} System.Data.SqlServerCe.SqlCeException
-  Errors {System.Data.SqlServerCe.SqlCeErrorCollection} System.Data.SqlServerCe.SqlCeErrorCollection
  Count 1 Integer

Merge Replication - Publisher Identity Range Assignment with Disconnected Subscriber


Hello everyone,

I have a merge replication topology setup as follows...  Publisher - SQL 2008 SP1, Distributor - SQL 2008 R2 (RTM), Subscriber - SQL 2008 SP1.

I recently had my subscriber disconnected for a couple days.  During this time, I was getting the following error on my publisher:

The insert failed. It conflicted with an identity range check constraint in database 'production', replicated table 'dbo.CustomerOrder', column 'CustomerOrderId'. 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.

I understand why I would normally get this error, but if the publisher and distributor are both online, why didn't the publisher attain a new range from the distributor after it hit its threshold?  Is this expected behavior whenever a subscriber is disconnected?

Thanks in advance.


MERGE Replication between SQL Server 2005 to SQL Server 2008 R2


Hi, i have a publisher with 3 publications with below SQL

Microsoft SQL Server 2005 - 9.00.4035.00 (Intel X86)   Nov 24 2008 13:01:59   Copyright (c) 1988-2005 Microsoft Corporation  Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 2)

I want to add a subscriber to the server with below SQL

Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64)   Apr  2 2010 15:48:46   Copyright (c) Microsoft Corporation  Enterprise Edition (64-bit) on Windows NT 6.0 <X64> (Build 6002: Service Pack 2) (VM)

Now when i am trying to add subscritpion to the 2008 R2 server on the publication server, i am getting below message

TITLE: New Subscription Wizard

For merge publications, the version of the Subscriber must not exceed the version of the Publisher.



Is merge replication not possible between the 2?? Please advice. I beliwve Microsoft's new releases should support its older versions...

SQL Server 2005 RMO Merge Replication Problems


We have a Visual Studio 2005 Windows Forms Application with SQL Server 2005 on the servers (Windows 2003) and SQL Express 2005 on the client PCs (Windows XP) using Merge Replication (Pull Subscriptions).

We are planning to upgrade user PCs to Windows 7 and are performing tests, we have installed SQL Server Express 2005 SP3. But when we try to synchornize, the error message we get is

 "Could not load file or assembly 'Microsoft.SqlServer.Replication, Version=,Culture=neutral,' or one of its dependencies. An attempt was made
to load a program with an incorrect format."

What would be the best approach to fix this problem ? We are not planning on upgrading the servers now.

Is there a way to change "Microsoft.SQLServer.Replication" DLL version that we referrence in the Visual Studio 2005 project so it can work with both XP and Windows 7 users without causing any problems ?

Your help would be highly appreciated.

Thank you,



Steps by Step document for configuration Merge Replication in 2005

Hi , Can anyone provide link to configure Merge Replication in 2005 with print screen.Also let me know the difference between Transcation level and Merge Replication. regards Vijay  

Replication between SQL Server 2005 and SQL Server 2008

Hi,    We were using SQL Server Transactional Replication between two SQL Server 2005 servers. Now we are going to upgrade the Publisher server to SQL Server 2008, Distributor Server remains as SQL Server 2005.     Can anyone let me know what is the challenges we need to face when configuring Replication between SQL Server 2005 and SQL Server 2008. Replication Method - Transactional Replication Distributor/Subscriber - SQL Server 2005 Publisher     -  SQL Server 208 Regards, Fazlu.

Using SQL Server Replication for SQL Server 2005 and 2008

I have an ASP.NET application that uses replication, and uses the RMO DLLs to do this. I initially built the application against the 2005 version of the DLLs and have it running successfully against SQL Server 2005. However, when I try running it against SQL Server 2008 it doesn't work. Initially I didn't deploy the Microsoft.SqlServer.* DLLs with my app - instead relying on them being in place on the server on which it was installed. However, when trying to make it work against SQL Server 2008 it was looking for the 2005 version DLLs which it wasn't able to locate. Following some other advice I read online I have now swapped out the 2005 DLLs and referenced the 2008 assemblies in my .NET project. In my MSI I now also deploy (i.e. redistribute) the SQL Server 2008 DLLs to the bin folder of my ASP.NET project. Now, when I try to run the application against SQL Server 2005 it fails to load the Microsoft.SqlServer.Replication assembly. I run depends.exe against this and find that it's dependent on SQLNCLI10.DLL which is missing on my machine with only SQL Server 2005 on it. So, what am I to do? Is this possible? How do I get around this?

database size limit about SQL Server 2005 Express

I know that there is a size limit (4 GB) for SQL Server 2005 Express, but I am not quite sure if the limit is applied for only ONE database data file or for ALL the database data, suppose I have two databases DB1 and DB2, so which of the following statement is correct? A. The size limit for DB1 is 4GB, and the size limit for DB2 is also 4GB, so if DB1 is 3G and DB2 is 3.5G,that will be OK. B. The total size for both DB1 and DB2 can not be larger than 4GB, which means if DB1 is 3G, then DB2 can not be large than 1G.

SQL Server 2005 Merge Publication Filters

Is it possible to have Merge Subscriptions of a Publication (or publications) storing a different range of data.E.g. Sub1 contains the clients of one Sales Person only.Sub2 sontains the Clients of Many Sales Persons in one Division.Can you do this with one Publication?  How would you setup the filters for this then?Or do you have to have two separate publications of the same database.Pub1 filtering based on the SalesStaff ID = SUSER_NAME()Pub2 filtering based on the DivisionID=SUSER_NAME()Can someone describe how best to setup this scenario?

@@IDENTITY issues created in MS Access after a Merge Replication

Hi all, We have 2 SQL Servers that update each other using Merge Replication. We then connect to the tables via an ODBC link within Access and this worked without any problems until we upgraded our SQL Server from 2000 to 2008 R2. Since the upgrade we are having problems within Access. When we come to add a new record, the record returned is different to the one we added. After much research we discovered its down to the triggers within SQL Server (from versions 2005 onwards) where the trigger updates the global variable @@IDENTITY. We've also found out that MS Access uses this variable to return the record that was supposedly last added but since it gets altered as part of a merge trigger it makes Access problematic. With this being a very big issue with MS Access and SQL Server Merge Replication triggers I can assume that others would have managed to work around this and come up with a solution. can anyone help?

SQL Server 2005 Replication Alerts

Dear Friends,We had some problems related to SQL Server 2005 Transactional replication. The distribution agent wasn't working properly. I am relatively new to Replication, so please bear with me. I need to configure alerts. I decided upon the below 3 options (if any other option is there please let me know), Replication agent failure Replication Warning: Transactional replication latency (threshold expires) Replication Warning: Subscription expiration (threshold expires)To test the 1st option, I deleted a row in subscriber and updated that row in publisher. Since the row no longer exist the distribution agent failed. I even dropped the table in subscriber and tested. We received alerts. Now for the 2nd option the lateny was 30sec. So if a transaction happened in publisher it needs to be replicated to subscriber within 30 sec. If not Replication warning alert will be fired. I assumed that since the replication agent was failing in 1st option after deleting and updating the same row in subscriber, I thought that it will cause the transaction to be retained in the distributor for a long time and hence it will make the threshold to expire (2nd option) and hence the alert would fire. But it never happened. So my question is as follows:1. How to make an alert happen for option 2 and option 3 ?2. Was my assumption/intepretation correct wrt to option 1 forcing option 2 fire.- Deepak

SQL Server 2005 bidirectional replication problems


I am having a system with two servers running SQL Server 2005 on Windows Server 2003.
Between the two SQL Server instances I am having a bidirectional replication of all my tables to always have the databases in sync.

When the replication is set up on the servers it normally runs fine for some time and then it stops working and I get errors like the following:

  Command attempted:
  if @@trancount > 0 rollback tran
  (Transaction sequence number: 0x000001B200005784000D00000000, Command ID: 1)
  Error messages:
  Violation of PRIMARY KEY constraint 'PK_MyTable'. Cannot insert duplicate key in object 'dbo.MyTable'. (Source: MSSQLServer, Error number: 2627)
  Get help: http://help/2627
  Violation of PRIMARY KEY constraint 'PK_MyTable'. Cannot insert duplicate key in object 'dbo.MyTable'. (Source: MSSQLServer, Error number: 2627)
  Get help: http://help/2627

And another error:

  Error messages:
  Agent 'SERV-A2-SYST-SERV-A1-10' is retrying after an error. 77 retries attempted. See agent job history in the Jobs folder for more details.

I do not know much about how the bidirectional replication works as I just set the replication up by some script

How to view merge replication error (sql 2005)


We're using 2005 merge replication and we found that some records deletion cannot synchronize from publisher table to other subscriber table. (This table have very small size(<1000 records). We want to view those replication system tables or any logs for diagnostics this serious problem. Can you suggest any replication system table or logs that can indicate the reasons or hints of records deletion outsync?

Thanks and regards,

SQL Server 2008 merge replication snapshot hangs on filtered articles


I have a publication on SQL Server 2008 Standard Edition using merge replication.  When I attempt to generate the initial snapshot, the snapshot agent appears to hang on the step "Setting up the publication for filtered articles."  I get a long (over 4 hour) series of messages: "The process is running and is waiting for a response from the server."  I know something is happening server-side, as SQL Server and the snapshot agent use a lot of memory and max out one core's processing capacity.

This has me confused as the publication is not doing any filtering.

Even more confusing:  I backed up the database and restored it onto my development-test system.  I created the snapshot there, and it took under 10 minutes every time.

Any suggestions for investigating and resolving this?

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