1. Edit the config file to set the path to parent folder where all your SQL Script files will reside.

2. Make sure that this folder contains 2 sub-folders , DML and DDL.

DML folder will hold all scripts which manipulate data (inserts, deletes, updates or any custom DML script).
DDL folder will contain all scripts which pertain to tables, SPs, Views etc.
You can have sub folders inside DML or DDL folders. Do not put "USE DATABASE" in any script.

3. Create a file named "SQLSequence.txt" in same folder as defined in #1. In case you want to keep the file name or location different, please change the same in Config file first.

4. Put relative paths (starting with DML or DDL) of all SQL scripts in this file. Each path should be on a new line and the order of paths should be based on dependencies. For example, if a view refers to a table and function, then the paths of script for that table and function should appear before the path of the view.

Any empty line or a line starting with "##" will be ignored. You can use "##" at the start of any line to put comments.

5. To run the utility, open command prompt and execute SQLDeploy.exe with following arguments:
  • User Name
  • Password
  • Server Name with optional port number (Example: MyLocalDBServer or MyLocalDBServer,1443)
  • Target DB name.

After the fix for Issue 368 Support for Windows Authentication, the sequence of arguments will change in next release. This page will be upated to denote the changes accordingly.

6. In order to use the same from a deployment manager like Hudson or Marimba, you can call the SQLDeploy.exe with required arguments while configuring the job.

Last edited Jul 3, 2011 at 6:28 PM by anksaxena, version 7

Comments

No comments yet.