• Put a safety check at the beginning of your script. We have to do the same thing (i.e., upgrade 100+ databases with a new release). To avoid accidental schema creation or schema upgrade into a "system" database the following is at the start of my script:

    SELECT CAST('Target Database is: ' + DB_NAME() AS VARCHAR(70));

    GO

    IF UPPER(DB_NAME()) IN ('MASTER', 'MODEL', 'MSDB')

    RAISERROR('Invalid database for schema creation.', 16, 1);

    GO


    [font="Arial Narrow"](PHB) I think we should build an SQL database. (Dilbert) What color do you want that database? (PHB) I think mauve has the most RAM.[/font]