We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

SQL Replication Problem - References between Views and Tables

arthrex
arthrex asked
on
Medium Priority
1,191 Views
Last Modified: 2012-05-06
Hello experts,

I wanted to install a replication of a db between a productive and backup server.
So I made a backup of the current DB from the productive server and restored that on the backup server.
Since we already had a merge replication publisher on the productive server, on the backup server  I created a subscription to that merge replication.
But when I started the synchronisation I received the following error:

************************

2009-02-13 10:21:41.888 The schema script 'Historie_25.sch' could not be propagated to the subscriber.
2009-02-13 10:21:41.997 Category:NULL
Source:  Merge Replication Provider
Number:  -2147201001
Message: The schema script 'Historie_25.sch' could not be propagated to the subscriber.
2009-02-13 10:21:41.997 Category:NULL
Source:  Microsoft SQL Native Client
Number:  3729
Message: Cannot DROP TABLE 'dbo.Historie' because it is being referenced by object '_Historie'.

*************************************

Now it makes total sense that you cannot drop a table when it's still referenced.
What can I do to resolve this problem?
Comment
Watch Question

Ted BouskillSenior Software Developer
CERTIFIED EXPERT
Top Expert 2009

Commented:
Commented:
Hi,

thanks for your response.
I found the solution myself. I had to release the reference in the create statement of the view.
Then it works

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.