Combine supportBack to main support page
Configuring Code Packages
Several key points must be considered when preparing a code package for deployment:
1. Order of package scripts: Upon package execution, scripts are deployed against all target databases defined in their associated Container in the order they are placed in the package. This rule applies to scripts that are either placed under folders in the package or directly under the root node of the package. For example, the order of script execution is listed in the figure below next to each package script. When the package is executed, the first script will be deployed on all its associated target databases. Once completed, the second script will be deployed on its databases, then the third script, and so on.
Figure 90: Order of script execution in the package.
2. Mapping scripts to Containers: Each script in the package must be mapped to a Container. First, recall that a Container consists of a group of target databases (see Static vs. Dynamic Containers for detailed information). Moreover, remember that each Container holds the authentication type and credentials that will be used to connect and deploy code against all databases defined in the Container. The script-to-Container mapping is most important as it is used by Combine to identify the set of one or more target databases on which each script in the package will be deployed.
Each script can be associated with a Container directly or scripts can inherit the Container from their parent node (either the root node of the package or the folder above the script icon in the package tree hierarchy). The default Container assigned to each script is "Use Parent Container" and can be changed in the Properties Window. To bring up the Properties Window, select the script you wish to edit and press F4. The Package Explorer and Properties Window for a demo package are presented in the figure below.
Figure 91: Associating a Container with a script.
You can change "Use Parent Container" to explicitly assign a Container to the script by clicking the Container property. After you click the property, a window with all Containers in the currently active Environment will be displayed and will let you select the desired Container. The dialog is presented in the following image together with the Container Manager (observe that the Development Environment is the currently active Environment since it is displayed in bold letters).
Figure 92: Selecting a Container to associate with the script.
Important Tip: You can simplify your packages by using folders and associating a Container with the folder. Then, only place scripts under the folder if you wish to deploy them on the databases of the Container associated with the folder and set the Container associated with each script to "Use Parent Settings" (which is also the default; See Associating a Container with Package Scripts and Folders). The code package will then become more structured and readable and will be easier to manage, and remember that you can use any number of folders in the package.
Figure 93: Using folders to well-organize and easily configure the package.
3. Container authentication type and credential settings: Each script associated with a Container will be deployed on the Container databases using the authentication type and credentials provided for the Container in the Container Manager. It is therefore important to verify that all Containers in the Container Manager are configured to use the correct authentication with the appropriate credentials. Note that Combine will not execute the package immediately after you hit the Execute button but will first verify that all settings are indeed correct and walk you through several dialogs before the actual execution. Furthermore, if any Containers are configured to use the Prompt authentication type then Combine will also ask you to provide the authentication type and credentials for each such Container that is referenced in the package before execution begins. The entered credentials are only collected for execution purposes and are not store by Combine. Please refer to the section titled Executing Code Packages to examine the process of code execution and the associated dialogs.
4. Check / uncheck scripts and folders in the package: A checkbox is available next to each package node (scripts, folders). If the checkbox next to a given script is checked then Combine will execute the script as part of the package execution. If you wish to exclude one or more scripts from the execution of the package you can uncheck the checkbox next to the script. You can also uncheck the checkbox of a folder to exclude all the scripts in the folder.
It is possible to check / uncheck a group of scripts / folders simultaneously. To do so you should select appropriate scripts and then Shift-click the checkbox next to a script. All selected checkboxes will be set to the state of the clicked checkbox. Please note that if clicked checkbox was not been selected -- it will be changed as well.
5. Configuration verification: When a package is executed, Combine will collect the database and server names for all target databases of all Static and Dynamic Containers referenced in the code package. Database and server names will be collected from all Static Container configurations and if Dynamic Containers are used then Combine will connect to the Reference Static Container and execute the Dynamic Container query to return all database and server names. Combine will also perform several verifications to ensure that the package can be executed correctly, such as ensuring that all Containers have at least a single target database. Furthermore, Combine will use the authentication type and credentials defined for each Container in the Container Manager to ensure that all target databases could in fact be connected using the provided authentication settings. If any Containers are configured to use the Prompt authentication type then you will be asked to provide the authentication type and credentials for each Container before verifying the connectivity to the target databases. The authentication types and credentials that you enter for each Container will also be used to deploy the package code against all databases in each Container. More information about the tests and verifications can be found in the section titled Executing Code Packages.