473,779 Members | 1,884 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Replication

1 New Member
Hi,

I am setting up transactional replication and have run into a problem… Can anyone help?

The table I am publishing is called Area. The table, Area, is the same on both the publisher and the subscriber.

When executing transactional replication, the error I get from the distribution agent is:-

Cannot update identity column 'AreaId'.

Cannot update identity column 'AreaId'.
(Source: WTEVAL01\REPORT ING (Data source); Error number: 8102)

This is the SQL for the table ‘Area’:-

Expand|Select|Wrap|Line Numbers
  1. CREATE TABLE [Area] (
  2.     [AreaId] [int] IDENTITY (1, 1)   NOT NULL ,
  3.     [AreaCode] [varchar] (6) COLLATE Latin1_General_CI_AS NOT NULL ,
  4.     [Description] [varchar] (30) COLLATE Latin1_General_CI_AS NOT NULL ,
  5.     [ParentAreaId] [int] NULL ,
  6.     [Priority] [int] NULL ,
  7.     [Visible] [bit] NOT NULL CONSTRAINT [DF_Area_Visible] DEFAULT (1),
  8.     [indent] [varchar] (5) COLLATE Latin1_General_CI_AS NULL ,
  9.     [CreateDate] [datetime] NOT NULL ,
  10.     [ModifyDate] [datetime] NOT NULL ,
  11.     [DisplayOrder] [int] NULL ,
  12.  
  13.  
  14.  
  15.  
  16.     CONSTRAINT [PK_Area] PRIMARY KEY  NONCLUSTERED 
  17.     (
  18.         [AreaId]
  19.     ) WITH  FILLFACTOR = 90  ON [PRIMARY] ,
  20.     CONSTRAINT [U_Area_Code] UNIQUE  NONCLUSTERED 
  21.     (
  22.         [AreaCode]
  23.     ) WITH  FILLFACTOR = 90  ON [PRIMARY] ,
  24.     CONSTRAINT [FK_Area_ParentArea] FOREIGN KEY 
  25.     (
  26.         [ParentAreaId]
  27.     ) REFERENCES [Area] (
  28.         [AreaId]
  29.     )
  30. ) ON [PRIMARY]
  31. GO

I’ve managed to work out from reading a few sites that the constraint PK_Area is being violated so I must disable this constraint for replication.

However, I have read that primary keys, unique keys or indexes cannot be disabled.

The only alternative I can think of is to drop the constraint PK_Area, but the subscriber server is a live production server and is constantly hit with queries therefore I’ve been told that re-building the index constraint PK_Area after each replication run (which is every 10 mins) is unacceptable.

How can I get round this?

Kind Regards,
Tom
Nov 27 '06 #1
1 2819
Borik
1 New Member
You need to use "NOT FOR Replication" in your identity column...


Hi,

I am setting up transactional replication and have run into a problem… Can anyone help?

The table I am publishing is called Area. The table, Area, is the same on both the publisher and the subscriber.

When executing transactional replication, the error I get from the distribution agent is:-

Cannot update identity column 'AreaId'.

Cannot update identity column 'AreaId'.
(Source: WTEVAL01\REPORT ING (Data source); Error number: 8102)

This is the SQL for the table ‘Area’:-

Expand|Select|Wrap|Line Numbers
  1. CREATE TABLE [Area] (
  2.     [AreaId] [int] IDENTITY (1, 1)   NOT NULL ,
  3.     [AreaCode] [varchar] (6) COLLATE Latin1_General_CI_AS NOT NULL ,
  4.     [Description] [varchar] (30) COLLATE Latin1_General_CI_AS NOT NULL ,
  5.     [ParentAreaId] [int] NULL ,
  6.     [Priority] [int] NULL ,
  7.     [Visible] [bit] NOT NULL CONSTRAINT [DF_Area_Visible] DEFAULT (1),
  8.     [indent] [varchar] (5) COLLATE Latin1_General_CI_AS NULL ,
  9.     [CreateDate] [datetime] NOT NULL ,
  10.     [ModifyDate] [datetime] NOT NULL ,
  11.     [DisplayOrder] [int] NULL ,
  12.  
  13.  
  14.  
  15.  
  16.     CONSTRAINT [PK_Area] PRIMARY KEY  NONCLUSTERED 
  17.     (
  18.         [AreaId]
  19.     ) WITH  FILLFACTOR = 90  ON [PRIMARY] ,
  20.     CONSTRAINT [U_Area_Code] UNIQUE  NONCLUSTERED 
  21.     (
  22.         [AreaCode]
  23.     ) WITH  FILLFACTOR = 90  ON [PRIMARY] ,
  24.     CONSTRAINT [FK_Area_ParentArea] FOREIGN KEY 
  25.     (
  26.         [ParentAreaId]
  27.     ) REFERENCES [Area] (
  28.         [AreaId]
  29.     )
  30. ) ON [PRIMARY]
  31. GO

I’ve managed to work out from reading a few sites that the constraint PK_Area is being violated so I must disable this constraint for replication.

However, I have read that primary keys, unique keys or indexes cannot be disabled.

The only alternative I can think of is to drop the constraint PK_Area, but the subscriber server is a live production server and is constantly hit with queries therefore I’ve been told that re-building the index constraint PK_Area after each replication run (which is every 10 mins) is unacceptable.

How can I get round this?

Kind Regards,
Tom
Feb 26 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
2298
by: Cherrish Vaidiyan | last post by:
Frank <fbortel@nescape.net> wrote in message news:<bqgb99$a04$1@news1.tilbu1.nb.home.nl>... > Cherrish Vaidiyan wrote: > > Hello, > > > > I have certain doubts regarding replication of Oracle 9i in Red Hat > > Linux 9. > > > > 1) I want to implement asynchronous/synchronous multimaster > > replication.I have heard about Replication Management Tool in OEM. > > What are the steps to be taken initailly for using Replication
6
3887
by: John | last post by:
Hi We have an access app (front-end+backend) running on the company network. I am trying to setup replication for laptop users who go into field and need the data synched between their laptops and the server upon return to the office. I am planning it this; Move all access tables to sql server and then link the tables to access front-end mdb app (using odbc?). Copy the same setup (access front end + sql backend) onto each laptop....
56
5972
by: Raphi | last post by:
Hi, I've been using an Access application I wrote for an office with the front-end stored on all computers and the back-end on one of them serving as an Access file server. Now we're moving to a 2nd office 15 minutes down the road. Only one office will be open at a time, so theoretically it'd be possible to copy the back-end manually every night from one office to another, but frankly, that's pretty annoying.
9
3933
by: David W. Fenton | last post by:
See: Updated version of the Microsoft Jet 4.0 Service Pack 8 replication files is available in the Download Center http://support.microsoft.com/?scid=kb;en-us;321076 This includes the Jet 4 synchronizer. This allows anyone to do indirect replication, even without
3
4550
by: Gert van der Kooij | last post by:
Hi, Our SQL Replication is between DB2 databases on Windows servers. I'm searching for the document which tells me how to migrate our SQL Replication environment from V8 to V9 (we also need to migrate from V7 to V8 but that's fully described so that's no problem). The PDF 'Migrating to Replication Version 9' doesn't contain a description about migrating SQL Replication, only Q replication. I found some links to PDF manuals which should...
0
9632
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10136
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9925
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8958
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7478
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6723
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5372
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4036
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3631
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.