Home arrow SQL Server arrow Page 7 - Replication: SQL Server 2000 - Part 1

Replication: SQL Server 2000 - Part 1

In this first installment of a 2-part series, Mahesh describes and explains what Replication is, its features and benefits, and how you can put it to use.

Author Info:
By: Mahesh Kodli
Rating: 4 stars4 stars4 stars4 stars4 stars / 210
November 10, 2003
  1. · Replication: SQL Server 2000 - Part 1
  2. · Replication Benefits
  3. · SQL Server Platform for Replication
  4. · Entities for the SQL Server Replication Model
  5. · Entities Further Explained...
  6. · Implementing Replication
  7. · Implementing Replication, Cont'd

print this article

Replication: SQL Server 2000 - Part 1 - Implementing Replication, Cont'd
(Page 7 of 7 )

Data Considerations for Replication

Special consideration should be taken for some of the data types and properties during replication. These Data types and properties are:

  • Identity range management
  • Unique identifier and Timestamp data types

Identity Range Management

Value of a column marked as Identity is incremented automatically, when new rows are added to the column table. In replication, where publication contains identity columns, the following configurations can be used to manage Identity columns.

  • Use Auto Identity range management of SQL Server 2000

For example, you can set the Identity range of 1 to 500 for Publication A at Publisher and 501 to 1000 for the same publication at Subscriber, with a threshold of 80%.

In this case, a newly inserted row at publisher will have Identity from 1 to 500 and a newly inserted row at subscriber will have identity from 501 to 1000.

When the threshold has reached 80%, a new identity range is used for the next inserts.  In this case, if the identity value reaches 400 at the Publisher any new inserts after that will use the new identity range from 1001 to 1500.  Similarly, if the Subscriber threshold reaches 800, any new inserts after that will have Identity range from 1501 to 2000.

The threshold value should be set carefully by evaluating the frequency of updates at the subscriber and synchronization schedule. Setting the threshold to a lower value will result in many unused Identity values.

The following system-stored procedures can also be used to set Identity range explicitly:

    • Sp_adjustpublisheridentityrange
    • Sp_addmergearticle
  • Use NOT FOR REPLICATION option when defining Identity columns

Identity ranges can also be managed by defining check constraint and the NOT FOR REPLCIATION option on Identity column. When an identity column is specified as NOT FOR REPLCATION, then its range should be provided programmatically. When this option is set, SQL server retains the original values set by the replication agent but continues to increment the value of the Identity column in a normal value, i.e. without resetting the Identity value.

DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

blog comments powered by Disqus

- Executing SQL Server Stored Procedure from P...
- How to Search for Date and Time Values Using...
- Replication: SQL Server 2000 - Part 2
- Replication: SQL Server 2000 - Part 1
- SQL Sever: Storing Code in Binary or Text Fi...
- Execute SQL on Multiple Tables/Columns - New...
- How to Connect to a SQL Server from Visual F...
- SQL Server Hardware Tuning and Performance M...
- Primary Key on Multiple Tables New RDBMS C...
- Migrating from Sybase to SQL Server
- What's Best for DBAs? GUI or T-SQL Comma...
- How to Perform a SQL Server Performance Audit
- An Introduction To The Bulk Copy Utility
- SQL Server Stored Procedures 101
- Building Your First SQL Server 2000 Database

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials