Showing posts with label friends. Show all posts
Showing posts with label friends. Show all posts

Monday, March 12, 2012

Key Violation during synchronization

Dear Friends

I restored same database in Publisher & subscriber.If I want to apply Transactional replication I have to apply initial snapshot.then I am getting key-violation problems during initialization .Some times Primary key table will be dropped before foreign key table.sometimes it won't able to drop some indexes.This I am getting if I am going for all tables of database.But here i need all tables.If I am going for selective table I don't have any problem.For avoiding this problem I tried all the options in table article option in publication wizard.But some na some key violation I am getting always.So please give me some better suggestion

Thanks in Advance

Filson

hi,

though i haven't done this

how about having a snapshot replication for the table that

encounter the key violation?

When your transaction replication encounters a key violation

run the snapshot replication.

this will work if there is no updating from the subscriber.

works like a multiple publication -multiple subscriber topology

regards,

|||

Sounds like you are trying to initialize a subscription with a backup. You may want to check the following document in book online to see if it helps.

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/rpldata9/html/75c8c1f8-60bc-44a8-944b-d18d1f6bda11.htm

Gary

|||

Gary I won't able to find this document in net.Can you give me it as a link.

Thanks

Filson

|||

You can access the article on web from here.

http://msdn2.microsoft.com/en-us/library/ms151705.aspx

FYI, the previous link I post is for SQL Server Book Online.

Cheers,

Gary

Key Violation during synchronization

Dear Friends

I restored same database in Publisher & subscriber.If I want to apply Transactional replication I have to apply initial snapshot.then I am getting key-violation problems during initialization .Some times Primary key table will be dropped before foreign key table.sometimes it won't able to drop some indexes.This I am getting if I am going for all tables of database.But here i need all tables.If I am going for selective table I don't have any problem.For avoiding this problem I tried all the options in table article option in publication wizard.But some na some key violation I am getting always.So please give me some better suggestion

Thanks in Advance

Filson

hi,

though i haven't done this

how about having a snapshot replication for the table that

encounter the key violation?

When your transaction replication encounters a key violation

run the snapshot replication.

this will work if there is no updating from the subscriber.

works like a multiple publication -multiple subscriber topology

regards,

|||

Sounds like you are trying to initialize a subscription with a backup. You may want to check the following document in book online to see if it helps.

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/rpldata9/html/75c8c1f8-60bc-44a8-944b-d18d1f6bda11.htm

Gary

|||

Gary I won't able to find this document in net.Can you give me it as a link.

Thanks

Filson

|||

You can access the article on web from here.

http://msdn2.microsoft.com/en-us/library/ms151705.aspx

FYI, the previous link I post is for SQL Server Book Online.

Cheers,

Gary

key column information is insufficient or incorrect

Dear Friends,
I have table contain 2000 out of those some are
duplicate when i select duplicate records by using Enterprise Manager
and make modification to one of those duplicate records the following
message flashes/display.

key columen information is insufficient or incorrect.Too many rows were
affected by update

pls suggest what is this and how to solve this problem

Thanks in advance

Dinesh Patwaldinu wrote:

Quote:

Originally Posted by

Dear Friends,
I have table contain 2000 out of those some are
duplicate when i select duplicate records by using Enterprise Manager
and make modification to one of those duplicate records the following
message flashes/display.
>
key columen information is insufficient or incorrect.Too many rows were
affected by update
>
pls suggest what is this and how to solve this problem
>
Thanks in advance
>
Dinesh Patwal


Before you can edit the data in Enterprise Manager you need to add a
unique constraint or unique index. To facilitate that it may help to
use SELECT DISTINCT to eliminate duplicates and copy the data to a new
table. It rather depends on just how you want to eliminate the
duplicate data. You can Google for lots of previous posts on this topic
in this group and in the microsoft.public.sqlserver groups.

--
David Portas, SQL Server MVP

Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.

SQL Server Books Online:
http://msdn2.microsoft.com/library/...US,SQL.90).aspx
--