Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SQL Server 2005 Replication

Posted on 2009-04-08
5
Medium Priority
?
256 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
[X]
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
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 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.
0
 

Author Closing Comment

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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

There are some very powerful Dynamic 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 di…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

636 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