SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


There is already an object named 'FK_OSS_KBN_PC' in the database.(Error: 14151, Severity: 18, State:...


There is already an object named 'FK_OSS_KBN_PC' in the database.(Error: 14151, Severity: 18, State: 1)

Author
Message
Minto Minto(quendans)
Minto Minto(quendans)
SSChasing Mays
SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)

Group: General Forum Members
Points: 609 Visits: 533
Hi All,

I am getting this below error and i can't figure out why this is happening.if anyone has ever encountered this please suggest me on the same.

Error: 14151, Severity: 18, State: 1.
Replication-Replication Distribution Subsystem: agent ******** failed. There is already an object named 'Foriegn key name' in the database.

We are using Transactional up datable replication.This error occurring continuously.

I have checked the synchronization status.There i am getting message like "There is already an object named 'Foreign key name' in the database"

At Replication monitoring i am getting errors like

There is already an object named 'Foreign key name' in the database. (Source: MSSQLServer, Error number: 2714)
Get help: http://help/2714

Please advice on the same.
GilaMonster
GilaMonster
SSC Guru
SSC Guru (237K reputation)SSC Guru (237K reputation)SSC Guru (237K reputation)SSC Guru (237K reputation)SSC Guru (237K reputation)SSC Guru (237K reputation)SSC Guru (237K reputation)SSC Guru (237K reputation)

Group: General Forum Members
Points: 237503 Visits: 46378
At the subscriber, that foreign key already exists somehow so the replication can't create it. Drop or rename the one in the subscriber database.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Minto Minto(quendans)
Minto Minto(quendans)
SSChasing Mays
SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)

Group: General Forum Members
Points: 609 Visits: 533
Hi Sir

Thanks for the quick reply.

I have checked the details of that Foreign Key.I checked the created _ datetime in both publisher and subscriber.

In subscriber :1.07AM
In Publisher :1.21AM

I think this is causing the issue.If we drop r rename will there be any impact .Any prerequisites we have to take for this??

Kindly suggest me on the same.
GilaMonster
GilaMonster
SSC Guru
SSC Guru (237K reputation)SSC Guru (237K reputation)SSC Guru (237K reputation)SSC Guru (237K reputation)SSC Guru (237K reputation)SSC Guru (237K reputation)SSC Guru (237K reputation)SSC Guru (237K reputation)

Group: General Forum Members
Points: 237503 Visits: 46378
It's not a duplicate key. It's a foreign key with the same name.

Check the subscriber database for objects with that name. If you find one, either drop it (if it's the same foreign key that the replication is trying to create) or rename it.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Minto Minto(quendans)
Minto Minto(quendans)
SSChasing Mays
SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)

Group: General Forum Members
Points: 609 Visits: 533
Sorry for the inconvenience.i provided wrong timings.Please find the below details

At publisher it was created :1.20Am
At Subscriber it was created :2.12Am
GilaMonster
GilaMonster
SSC Guru
SSC Guru (237K reputation)SSC Guru (237K reputation)SSC Guru (237K reputation)SSC Guru (237K reputation)SSC Guru (237K reputation)SSC Guru (237K reputation)SSC Guru (237K reputation)SSC Guru (237K reputation)

Group: General Forum Members
Points: 237503 Visits: 46378
Was it created manually or was it created by the replication agents?

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Minto Minto(quendans)
Minto Minto(quendans)
SSChasing Mays
SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)

Group: General Forum Members
Points: 609 Visits: 533
If we do rename will there be any impact
GilaMonster
GilaMonster
SSC Guru
SSC Guru (237K reputation)SSC Guru (237K reputation)SSC Guru (237K reputation)SSC Guru (237K reputation)SSC Guru (237K reputation)SSC Guru (237K reputation)SSC Guru (237K reputation)SSC Guru (237K reputation)

Group: General Forum Members
Points: 237503 Visits: 46378
As long as it's a different object (not exactly the same foreign key that the replication is trying to create), should be OK as long as no code references it.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Minto Minto(quendans)
Minto Minto(quendans)
SSChasing Mays
SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)SSChasing Mays (609 reputation)

Group: General Forum Members
Points: 609 Visits: 533
Hi,

We didn't create that Key.And today we are getting again the below error.

Error:

The subscription(s) have been marked inactive and must be reinitialized. NoSync subscriptions will need to be dropped and recreated. (Source: MSSQLServer, Error number: 21074)

Note:We have kept subscription never expires.Still why we are getting this error.

I am not getting clear idea about rename and dropping key.Is it ok to rename or drop the foreign key with same name from subscriber??
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search