Deploy Db2 object changes on the target Db2 subsystem using an input file that contains the DDL. For example, an application developer has made changes to DDL in a local file and is ready to test the DDL changes. Use this command to deploy the changes to the test environment.
Usage
zowe dbm-db2 deploy ddl <local-input-ddl-filename> [options]
Positional Arguments
Required Options
Options
-
--match-set
| --ms
(string)
-
Specifies the creator and name of an existing RC/Migrator automapping mask set. Matching is used to pair objects in a DDL file to objects that are defined on a Db2 subsystem. Matching determines whether the 'change-set' or 'rule-set' options are applied.
Format:
<match\-set\-creator\.match\-set\-name>
For more information about mask services, see the RC/Migrator documentation at https://techdocs\.broadcom\.com/db2rcmig\.
Note: If \-\-match\-set and \-\-match\-set\-file are both specified, specifications in match\-set\-file take precedence\.
-
--match-set-file
| --msf
(string)
-
Specifies the name of the local input file that contains the mapping mask specifications. Matching is used to pair objects in a DDL file to objects that are defined on a Db2 subsystem. For example, a mask specification can account for different schema naming patterns across environments. Matching determines whether the 'change-set' or 'rule-set' options are applied.
Format:
<object\-type> <source\-name\-mask> <target\-name\-mask>;
STOGROUP <name> <name>
DATABASE <name> <name>
TABLESPACE <database\.name> <database\.name>
TABLE <schema\.name> <schema\.name>
INDEX <schema\.name> <schema\.name>
VIEW <schema\.name> <schema\.name>
SYNONYM <schema\.name> <schema\.name>
ALIAS <schema\.name> <schema\.name>
TRIGGER <schema\.name> <schema\.name>
SEQUENCE <schema\.name> <schema\.name>
FUNCTION <schema\.name\[\.version\]> <schema\.name\[\.version\]>
PROCEDURE <schema\.name\[\.version\]> <schema\.name\[\.version\]>
Note: <schema> must be 8 characters or less\. <name> must be 18 characters or less\. The SEQUENCE <name> must be 8 characters or less\.
A mask specification can include the following wildcard characters:
% (percent sign) indicates that zero or more characters can occupy that position\. Other non\-wildcard characters must match\.
\- (hyphen) indicates that any character can occupy that position, but a character must exist at that position\.
\* (asterisk) indicates that like named objects on the source and target should be mapped\. No other characters can appear together with this character\.
Use a semicolon to separate mask specifications\. Multiple mask specifications for the same object type are supported\.
Example:
The following example demonstrates different ways of matching the table MYNAME.MYTABLE to the table YOURNAME.YOURTABLE:
TABLE MY%.%TABLE YOUR%.%TABLE;
TABLE MYN-M-.MYT% YOURN-M-.YOURT%;
TABLE MYNAME.MYTABLE YOURNAME.YOURTABLE;
TABLE *.MYTABLE *.YOURTABLE;
For a list of mask specifications, see the RC/Migrator documentation at https://techdocs\.broadcom\.com/db2rcmig\.
Note: If \-\-match\-set and \-\-match\-set\-file are both specified, specifications in match\-set\-file take precedence\.
-
--change-set
| --cs
(string)
-
Specifies the creator and name of an existing RC/Migrator global change set to be used to modify Db2 object attributes. The changes apply to new objects only as determined by match-set processing.
Format:
<change\-set\-creator\.change\-set\-name>
For more information about global change services, see the RC/Migrator documentation at https://techdocs\.broadcom\.com/db2rcmig\.
Note: If change\-set and change\-set\-file are both specified, specifications in change\-set\-file take precedence\.
-
--change-set-file
| --csf
(string)
-
Specifies the name of the local input file that contains the global change specifications to modify Db2 object attributes. The changes apply to new objects only as determined by match-set processing.
Format:
<object\-attribute> <from\-value> <to\-value>
The <object\-attribute> consists of four characters\. The first two characters identify the object type\. The last two characters identify the specific attribute\. Wildcard characters are supported in the <from\-value> and <to\-value>\. The first occurrence in multiple specifications for the same <object\-attribute> has the highest precedence\.
Example:
The following example demonstrates changes to table’s schema (creator) and tablespace names:
TBCR TEST% PROD%
TBTS TESTTS% PRODTS%
For a list of global change set attributes, see the RC/Migrator documentation at https://techdocs\.broadcom\.com/db2rcmig\.
Note: If change\-set and change\-set\-file are both specified, specifications in change\-set\-file take precedence\.
-
--rule-set
| --rs
(string)
-
Specifies the creator and name of an existing RC/Migrator rule set to be used to override Db2 object attributes in the target Db2 subsystem with the corresponding values from the input DDL file.The changes apply to the existing objects only (as determined by match-set processing).
Format:
<rule\-set\-creator\.rule\-set\-name>
For more information about rule database services, see the RC/Migrator documentation at https://techdocs\.broadcom\.com/db2rcmig\.
-
--modification
| -m
(string)
-
Identifies a named set of server-managed default parameter values that control the execution behavior of the zowe dbm-db2 commands. For example, you can use a modification to identify a set of default values that differ from the set of values that are normally used.
For more information about using the modification option, see the DBM Data Service documentation at https://techdocs.broadcom.com/db2mgmt.
-
--error-file
| --ef
(string)
Profile Options
Base Connection Options
-
--host
| -H
(string)
- Host name of service on the mainframe.
-
--port
| -P
(number)
- Port number of service on the mainframe.
-
--user
| -u
(string)
- User name to authenticate to service on the mainframe.
-
--password
| --pass
| --pw
(string)
- Password to authenticate to service on the mainframe.
-
--reject-unauthorized
| --ru
(boolean)
-
--token-type
| --tt
(string)
- The type of token to get and use for the API. Omit this option to use the default token type, which is provided by 'zowe auth login'.
-
--token-value
| --tv
(string)
- The value of the token to pass to the API.
-
--cert-file
(local file path)
- The file path to a certificate file to use for authentication
-
--cert-key-file
(local file path)
- The file path to a certificate key file to use for authentication
Examples
-
Update Db2 objects on a target Db2 subsystem according to DDL definitions in myddl.sql file:
zowe dbm-db2 deploy ddl myddl.sql --target-db2 TEST
-
Update Db2 objects according to the input DDL definitions and applied rule set for the matched objects:
zowe dbm-db2 deploy ddl myddl.sql --target-db2 TEST --rule-set USER1.RULESET
-
Update Db2 objects according to the input DDL definitions and applied rule set for the objects matched as determined by the local mask specifications in the pair.txt file:
zowe dbm-db2 deploy ddl myddl.sql --target-db2 TEST --rule-set USER1.RULESET --match-set-file pair.txt