The always-up-to-date version of the documentation is directly in the Source Code download

Overview
Please see the pptx file (Metadata Driven Database Deployment.pptx) for a general overview and links to the demos.

Prerequisites
  • Powershell
  • SQL Server
  • It is possible to get MD3 to run with Oracle or any RDBMS. If you contact me directly I can help you with this. We simply modify a few of the MD3 procedures and it works.

Running MD3
powershell .\RunMD3 -ServerName "whatever" -DatabaseName "YourDbHere"

General MD3 Script Ordering Rules
  • Scripts and Folders are run alphabetically.
    • we only execute .sql files
    • If you need to run Foo.sql prior to Bar.sql then either
      • rename Bar.sql to 00Bar.sql and create a new Bar.sql with a comment that the file has moved due to an ordering dependency
      • use subfolders
    • it is VERY rare to have dependency issues within the same folder
  • Within a given folder, the .sql scripts are run PRIOR to any subfolders
    • use whatever folder structure you like, and nest as deep as you like
  • If you wish to skip a folder from execution, preface the folder with "_".
    • For instance, "_Documentation"
  • If you wish to skip a file from execution either
    • rename it to something other than .sql
    • "zero out" (blank) the file.
  • Any valid TSQL will be executed. You don't need any special formatting
    • if you follow our "metadata-driven" approach, then you'll get "rerunnability" for free
    • when an ERROR occurs (Severity >= 11) then MD3 aborts and displays and logs an error.
    • Simply fix the error and redeploy.
    • If you have your rerunnability correct then you do NOT have to restore the db first
  • Supports the concept of "MasterData" which is data that is deployed as lookup data.
    • The "MasterData" file format ensures that any version of MasterData can be updated to current
without needed to write complex TSQL.
  • All MD3 objects are deployed to the MD3 schema. This must run FIRST (or, almost first).
  • "Special" folders and files
    • Anything placed in the PostApply folder will run near the END
    • .\00Pre-install\00CreateDatabase.sql ALWAYS runs FIRST.
      • You can place db creation logic
      • or backup logic
      • or nothing in this file. The choices are yours.

Scripters
MD3 includes a series of scripting tools (Scripters) to get your database scripting out in .sql files, in MD3 format.

Validators
MD3 includes a series of schema and lookup data validators to help you ensure that MD3 is deploying things correctly.

For More Information
Please download the source code and read the entries in \_Documentation as well as \Demos and the associated .pptx file. I can be reached at dave at davewentzel dot com or www.davewentzel.com. The pptx file can also be downloaded separately (Metadata Driven Database Deployment.pptx).

Last edited Dec 11, 2013 at 1:29 PM by dwentzel, version 8