Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2008

    Unanswered: Replication Of Views That Reference Other Views

    i am getting this error in Merge Replication using Sql Server 2005

    Error messages:
    The schema script 'VW1_1452.sch' could not be propagated to the subscriber.
    Unable to replicate a view or function because the referenced objects or columns are not present on the Subscriber.

    Invalid object name VW2'.

    I think the error occurs, because VW2 is not yet present on the subscriber when the agent tries to create VW1. (when i check the views created on the subscriber after the agent fails, VW2 is missing)

    so how can I tell the agent the order of creating objects?
    or is there any other solution?

    any help will be highly appreciated.


  2. #2
    Join Date
    Dec 2008
    I think the problem is coming from the nested view (a view that references
    a view). Because VW2 is referenced in VW1

  3. #3
    Join Date
    Jul 2009

    Post Unable to replicate a view or function because the referenced objects or columns are

    From my own understand of what we use to resolve the same problem in my office.

    on the PUBLISHER

    Go to the DB and go to views right click on the view of the table you want to replicate

    Go to All Task - Generate SQL script

    Click on Formatting, two options are checked by default, the the third one "Generate script for all dependent objects"

    then go Options under TABLE SCRIPTING OPTIONS
    check Script indexes
    check script full-text indexes
    check PRIMARY keys, FOREIGN keys, defaults and check constraint

    click ok and then save the sql script in to your desire location and after succefully generated open the script and copy the content

    Using query analyzer connect to the second DB and paste the script copied and run it.

    Go back to your primary server, enterprise manager and go to your PUBLISHER and start the agent to start synchronization of the snapshot.

    I just hope this will help you out

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts