Solved

SQL Server 2005 Replication

Posted on 2009-04-08
5
213 Views
Last Modified: 2012-05-06
Hi,

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,
0
Comment
Question by:sitg
  • 3
  • 2
5 Comments
 
LVL 60

Expert Comment

by:chapmandew
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.
0
 

Author Comment

by:sitg
ID: 24128188
Hi,

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.
0
 

Author Comment

by:sitg
ID: 24128232
Hi

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
0
 
LVL 60

Accepted Solution

by:
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.
0
 

Author Closing Comment

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

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

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…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

910 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now