ODE release system supports both small incremental releases and full releases to a next environment. Read more about a release theory here. Developer can choose a size of the release by setting a release number to configuration records. One release could include any set of Config records.
This article is a step-by-step manual on how to do an incremental (partial) release to another ODE_Config database. Records of partial release will be added to or update existing records in target Config database. Note that Config record deletion could not be a part of incremental release. If you remove records from Config tables, this could be applied by the Full release only.
Consider using the automated release tool implemented on the basis of SQL Server Integration Services. This SSIS package executes all of the following steps for you with the pre-defined settings and a number of customised parameters.
Before any development has started, register a release in ODE config. Release number is an integer number. For example, I use the development start date as a release number:
USE [ODE_Config] EXECUTE [dv_release].[dv_release_master_insert] @release_number = 20160228 ,@release_description = 'Add Customer ensemble' ,@reference_number = 'US10' ,@reference_source = 'Jira' GO
All the ODE development stored procedures have a release number parameter. Pass the release number to procedures during the development, so these records will be included to the release.
Once configuration is ready to be released to the next environment, build a release. Release will be recorded in SQL statements at the [dv_release].[dv_release_build] table:
EXECUTE [dv_release].[dv_build_release_config] @vault_release_number = 20160228 GO
Release commands could be saved to file on a physical drive:
EXECUTE [dv_release].[dv_export_release_file] @vault_release_number = 20160228 ,@vault_file_location = 'C:\ODE_Releases' GO
Each file has a unique name which includes a release number and file creation date. You can make changes to the release, rebuild it and save to the file again.
Place the release file to a folder in the target environment. Import release instructions to the ODE Config:
EXECUTE [dv_release].[dv_import_release_file] @vault_file_location = 'D:\Copied_ODE_Releases' ,@vault_file_name = 'DV_Release__20160228__20160429_142716.txt' GO
Release commands are copied. Apply them:
EXECUTE [dv_release].[dv_apply_release_config] @vault_release_number = 20160228 GO
Now ODE_Config has new configuration data copied from another environment. If there are any new vault tables configured as a part of this release, they should be created afterwards. Use this helper script to prepare statements to do this.
Note that this release process includes ODE_Config objects only, but not staging objects, such as stored procedures. They should be released separately. Microsoft Visual Studio with SQL Server Data Tools could help to do this. Add your staging database to the Visual Studio solution and keep it up to date with your development environment. Release scripts could be composed by the “Schema compare” tool.