• We have a similar concept but in our case the developer uses some Visual Basic code to build up a single change script. Each individual script is bracketed with a comment header that has the file name & last-modified date, and a footer with a GO statement to prevent any conflict between the scripts.

    On one occasion, a junior DBA applied a QA script to the production db, so we also added this to the top of the change script:

    IF NOT EXISTS

    (SELECT 1

    FROM sys.sysdatabases

    WHERE [name] = 'ABC')

    RAISERROR ('INCORRECT DATABASE', 21, 1) WITH LOG

    which will disconnect from the server.