Welcome to ModelRight Sign in | Join | Help
in

Schema names on triggers not part of Forward Engineering

Last post 10-02-2008, 5:39 PM by axelrod_eric. 3 replies.
Sort Posts: Previous Next
  •  10-02-2008, 2:14 PM 937

    Schema names on triggers not part of Forward Engineering

     I reverse engineered a SQL Server 2005 database, and the RE worked flawlessly with one exception.  This block of code is the actual CREATE TRIGGER used to create it in SQL Server (outside of ModelRight):

     CREATE TRIGGER [EDW].[ProductUpdateTrigger]
        ON [EDW].[DIM_PRODUCT]

    ...

    END

     

     This block of code is what ModelRight reversed engineered:

    CREATE TRIGGER ProductUpdateTrigger
        ON DIM_PRODUCT

    ...

    END

     

    As you can see, the schema is missing.  This causes the database compare / forward engineer to fail.

    Can anyone provide guidance?

  •  10-02-2008, 2:44 PM 938 in reply to 937

    Re: Schema names on triggers not part of Forward Engineering

    You need to do two things:

    1.  Assign an owner/schema to it.

    2. In the Schema Gen Options, under  Miscellaneous you need to check Schema Names,

    Hope it helps.

     


    ModelRight Evangelist
  •  10-02-2008, 5:24 PM 945 in reply to 938

    Re: Schema names on triggers not part of Forward Engineering

    You also need to set the Schema Gen Option/Misc/Quote Names option
    Scott Reynolds
    Senior Technical Support
    ModelRight, Inc.
  •  10-02-2008, 5:39 PM 947 in reply to 938

    Re: Schema names on triggers not part of Forward Engineering

    I have manually assigned schemas to all of the triggers, but the DB Compare is still not reverse engineering the schema name.  It now thinks all of the triggers (to which I assigned schemas in MR) are new -- they don't match up to the triggers of the same name in the database (because the RE database triggers don't have schema).

     

    This all occurs before I get to the Schema Gen Options window.