Hi,
How transaction replication handles this : subscriber side updatable
if there is already a row with same primary key value on
subsciber, will replication give error of duplicate key /
key already exist while inserting at subscriber or what
will happen?
eg.
publisher server S1
database D1
table order
primary key order_no
data:
order_no customer_no item_no...
1 1 1
2 ...
3
4
subscriber server S2
database D2
table order
primary key order_no
data
order_no customer_no item_no...
1 1 1
2 ...
3
4
5
what if someone insert order_no 5 on subscriber and then
same order no came to publisher and replication tried to
replicate order no 5 to subscriber what will happen?
Please reply.
Ram.Primary key constraints error will be displayed if trying to insert duplicate values.|||Originally posted by Satya
Primary key constraints error will be displayed if trying to insert duplicate values.
Satya,
I checked . Replication just ignore the action of insertion if primary key exist on the subscriber. no error!
Ram.
Showing posts with label duplicate. Show all posts
Showing posts with label duplicate. Show all posts
Wednesday, March 7, 2012
replication - duplicate key.
Labels:
database,
duplicate,
handles,
key,
microsoft,
mysql,
oracle,
primary,
replication,
row,
server,
sql,
subsciber,
subscriber,
transaction,
updatableif,
value
Replication - duplicate key
I am activating a replication of the transacional type with only one table.
Everything enable normal, at the moment to pass the data appears the
following message:
String data, right truncation
(Source: 172.18.7.22 (ODBC); Error number: 22001)
------
Unexpected EOF encountered in BCP data-file
(Source: 172.18.7.22 (ODBC); Error number: S1000)
------
Violation of PRIMARY KEY constraint 'PK__PDVMAP__55AB7606'. Cannot insert
duplicate key in object 'PDVMAP'.
(Source: 172.18.7.22 (Data source); Error number: 2627)
However in the destination it does not have these data, not have duplicate
key, as much that I obtain to export the same data for the DTS.
Do you get this error if you use character mode format?
Are you replicating to a table and dropping it before you recreate it?
Hilary Cotter
Looking for a SQL Server replication book?
Now available for purchase at:
http://www.nwsu.com/0974973602.html
"Carla" <Carla@.discussions.microsoft.com> wrote in message
news:B9386AF0-7D2C-4A50-A240-8BE70C1A2F0D@.microsoft.com...
> I am activating a replication of the transacional type with only one
table.
> Everything enable normal, at the moment to pass the data appears the
> following message:
> String data, right truncation
> (Source: 172.18.7.22 (ODBC); Error number: 22001)
> ----
--
> Unexpected EOF encountered in BCP data-file
> (Source: 172.18.7.22 (ODBC); Error number: S1000)
> ----
--
> Violation of PRIMARY KEY constraint 'PK__PDVMAP__55AB7606'. Cannot insert
> duplicate key in object 'PDVMAP'.
> (Source: 172.18.7.22 (Data source); Error number: 2627)
> However in the destination it does not have these data, not have duplicate
> key, as much that I obtain to export the same data for the DTS.
|||i′m using this configurates:
in the table article propertier - snapshot - if a table named xx exist at
the subscriber: keep the existing table unchanged.
Copy objects to destination:
It′s marked the options:
Include declared referential integrity
Clustered indexes
Nonclustered indexes
User triggers
extended properties
[]′s
"Hilary Cotter" wrote:
> Do you get this error if you use character mode format?
> Are you replicating to a table and dropping it before you recreate it?
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> Now available for purchase at:
> http://www.nwsu.com/0974973602.html
>
> "Carla" <Carla@.discussions.microsoft.com> wrote in message
> news:B9386AF0-7D2C-4A50-A240-8BE70C1A2F0D@.microsoft.com...
> table.
> --
> --
>
>
Everything enable normal, at the moment to pass the data appears the
following message:
String data, right truncation
(Source: 172.18.7.22 (ODBC); Error number: 22001)
------
Unexpected EOF encountered in BCP data-file
(Source: 172.18.7.22 (ODBC); Error number: S1000)
------
Violation of PRIMARY KEY constraint 'PK__PDVMAP__55AB7606'. Cannot insert
duplicate key in object 'PDVMAP'.
(Source: 172.18.7.22 (Data source); Error number: 2627)
However in the destination it does not have these data, not have duplicate
key, as much that I obtain to export the same data for the DTS.
Do you get this error if you use character mode format?
Are you replicating to a table and dropping it before you recreate it?
Hilary Cotter
Looking for a SQL Server replication book?
Now available for purchase at:
http://www.nwsu.com/0974973602.html
"Carla" <Carla@.discussions.microsoft.com> wrote in message
news:B9386AF0-7D2C-4A50-A240-8BE70C1A2F0D@.microsoft.com...
> I am activating a replication of the transacional type with only one
table.
> Everything enable normal, at the moment to pass the data appears the
> following message:
> String data, right truncation
> (Source: 172.18.7.22 (ODBC); Error number: 22001)
> ----
--
> Unexpected EOF encountered in BCP data-file
> (Source: 172.18.7.22 (ODBC); Error number: S1000)
> ----
--
> Violation of PRIMARY KEY constraint 'PK__PDVMAP__55AB7606'. Cannot insert
> duplicate key in object 'PDVMAP'.
> (Source: 172.18.7.22 (Data source); Error number: 2627)
> However in the destination it does not have these data, not have duplicate
> key, as much that I obtain to export the same data for the DTS.
|||i′m using this configurates:
in the table article propertier - snapshot - if a table named xx exist at
the subscriber: keep the existing table unchanged.
Copy objects to destination:
It′s marked the options:
Include declared referential integrity
Clustered indexes
Nonclustered indexes
User triggers
extended properties
[]′s
"Hilary Cotter" wrote:
> Do you get this error if you use character mode format?
> Are you replicating to a table and dropping it before you recreate it?
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> Now available for purchase at:
> http://www.nwsu.com/0974973602.html
>
> "Carla" <Carla@.discussions.microsoft.com> wrote in message
> news:B9386AF0-7D2C-4A50-A240-8BE70C1A2F0D@.microsoft.com...
> table.
> --
> --
>
>
Labels:
activating,
appears,
database,
duplicate,
enable,
key,
microsoft,
mysql,
oracle,
replication,
server,
sql,
table,
transacional,
type
Subscribe to:
Posts (Atom)