SQL Server 2005 Replication

Posted on 2009-04-08
Last Modified: 2012-05-06

We have two Servers on which we have implemented the Trasantional Replication and it works fine.
But still we have some unclear answers like Replcation is done from Server A to Server B.
Before doing the replication we generated the Server A Database script and ran on Server B, and IDENTITY INSERT was ON for all Tables along with Primary Keys.  Now Issue is that, we have TRANS table in the database  on which we perform inserts at server B.
So, at present (Server A)the current MIN(ID) is around 6000 and the MAX(ID)  approx  130000 in TRANS. If we are inserting data in TRANS table at server B, It starts the ID column from 1. and I affraid once the TRANS table ID column reaches to 6000, it can create some Issue.
Issues like can't  contain duplicate records.

Please advice,

With Regards,
Question by:sitg
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 60

Expert Comment

ID: 24115194
Sounds like your problem is that you don't have immediate updating subscribing enabled.  You have replication setup from A to B, but not from B to A also.  So, the changes you make at B will not get propogated to A.

Author Comment

ID: 24128188

Actually we have TRANS table whose data is transferring from server A to Server B using Tracnsactional Replication(Using Primary Key). and For Example:
Server A TRANS table starts from ID 6 to 130000 which is  transferred to server B TRANS table (IDENTITY INSERT ON). SO server B TRANS also contains data from 6 to 130000.
Myquestion is: When we insert records in TRANS table of server B. It take ID column from 1.
and i believe that if this IDcolumn reach to 6000. it can create insertion problem. because it contains primary key on ID column.

Author Comment

ID: 24128232

Sorry, I did typo mistake,

Myquestion is: When we insert records in TRANS table of server B. It starts ID column from 1.
and i believe that if this IDcolumn reach to 6. it can create insertion problem. because it contains primary key on ID column.

We want whenever we insert records into TRANS table of server B, its ID column starts from the max(value) that was inserted during replication from server A. It should not start from 1. Please advice
LVL 60

Accepted Solution

chapmandew earned 250 total points
ID: 24129305
Yeah, you're probably not going to be able to do that unless you
a.  programatically go find the highest value and then use
SET IDENTITY INSERT on for the table
b.  reseed the values on the B server.

Option a is your best bet.

Author Closing Comment

ID: 31568408
thanks, I was hoping the same. But now im sure about it. :-)

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Pivot Query Problem 9 53
Isolation level in SQL server 3 58
LAG_ROWID - how do I get the right order using this query? 2 27
denied execute as 13 57
There are some very powerful Data Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a discu…
INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
In an interesting question ( here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question