• Jack Corbett (8/22/2014)


    DennisPost (8/22/2014)


    Resolved.

    Daily job saves all indexed views into a table.

    DDL trigger checks if the view to be alter is in the IndexedView table.

    If so, raise error & rollback.

    To alter the view, the view must be deleted from the IndexedView table.

    Good solution. I read this thread yesterday, but couldn't come up with any ideas so didn't commetn.

    BWAAA-HAAA!!!! "It's not a fault... it's a FEATURE" that forces you to rebuild the indexes anytime you make a change. 😀

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)