Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Snapsh. replication problem: foreign key references

Status
Not open for further replies.

MakeItSo

Programmer
Oct 21, 2003
3,316
DE
Hi Guys.

I am trying to establish a (snapshot) replication of a database onto a testsystem which will be used for testing, but also as a backup if anything should happen to the "live" data.

However I cannot establish a functioning replication.
I always get errors like "object ... cannot be dropped because it is referenced by a foreign key".

I need the foreign keys. I have managed to establish a pseudo replication now by deleting all references between tables in the testsystem.

How can I solve this problem?

Thanks for any input,
Andy

Andreas Galambos
EDP / Technical Support Specialist
(andreas.galambos@bowneglobal.de)
HP:
 
Guess I solved it.

Just in case anyone needs a solution for this:

Since taking out the "force relationship for replication" property alone did not solve the problem, I created a new profile for the distribution agent.
In it, I included the error numbers of Foreign Key constraint errors on replication into the SkipErrors property.

Now replication is not halted on foreign key errors anymore.

Not perfect - but for the moment I can live with that.


Andreas Galambos
EDP / Technical Support Specialist
(andreas.galambos@bowneglobal.de)
HP:
 
Need to boost this back to the top
Although SkipErrors made the Replication finish, it kept the replication from updating vital data...[cry]

I have re-done the entire procedure, de-activated the options
"enforce relationship for replication" on source-db side and
"enforce relationship for INSERT adn UPDATE" on destination-db side.

Still no go. This is slowly driving me nuts [hairpull2]

I'd be more than delighted for any input you can give, be it a solution or simply new ideas...

Cheers,
Andy

Andreas Galambos
EDP / Technical Support Specialist
(andreas.galambos@bowneglobal.de)
HP:
 
Yeeehah - Chopped this one! [karate]

FYI: I have found the solution in an SQL-Server specific forum:
It was simple - but you need to know it first:
before pushing a new subscription, you need to adjust the article properties.
There,
[ul][li]select the "Snapshot" tab[/li]
[li]de-select "Drop table"[/li]
[li]select "delete all rows" instead[/li]
[li]then push new subscription - voilà![/li][/ul]


-41.gif

Hava nagila, hava nagila...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top