View Replication Problem

  • Greetings,

    I'm trying to replicate views down to a 'sales' test database so users can

    test out numbers without affecting the real site. I'm able to set up

    publications for the tables and procs but I cannot replicate views because

    the views are not being recreated in the proper dependency order.

    Seems that the snapshot agent relies on info from sysdepends table to define the order of the scripts applied at the subscriber but there are some bugs in SQL2K(SP2) that not all dependencies are listed.

    The sysmergeschemachange table holds the order in the schemaversion column.

    I had someone say that they had written a script to manually reorder the schema scripts after the snapshot agent had run. HOWEVER, I can no longer contact that individual.

    If anyone has any idea on how I can either design this script? The other workaround seems to be to create two publications, one for all of the dependency views FIRST and then one of everything else.

    Regards,

    Christopher Klein

  • Interesting. One possibility is to 'fix' sysdepends. I don't typically replicate views, instead I'll run a post snapshot script to create other objects needed, change the indexes, etc. Reordering the script seems like a lot of work and you need to know the correct order, so you're back to needing sysdepends or something similar.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply