SQL Server 2005 Replication

Posted on 2009-04-08
Medium Priority
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 750 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

770 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