broadcom / broadcom.dbm_db2 / 1.27.2 / module / compare_ddl Compare objects that are defined in a DDL file to objects that are defined on a Db2 subsystem and generate an update script to implement the necessary object changes | "added in version" 1.0.0 of broadcom.dbm_db2" Authors: Rabah Beggar <rabah.beggar@broadcom.com> (@broadcom), Sergei Osadchuk <sergei.osadchuk@broadcom.com> (@broadcom) | supported by Broadcom This plugin has a corresponding action plugin.broadcom.dbm_db2.compare_ddl (1.27.2) — module
Install with ansible-galaxy collection install broadcom.dbm_db2:==1.27.2
collections: - name: broadcom.dbm_db2 version: 1.27.2
Compare objects that are defined in a DDL file to objects that are defined on a Db2 subsystem and generate an update script to implement the necessary object changes. This command also generates a high-level change summary report and a parseable impact analysis report. You can execute the script that is generated from this command using the 'zowe dbm execute compare-script' command.
For details about command usage for automation, see DBM-Db2 samples at https://github.com/BroadcomMFD/dbm-db2-for-zowe-cli.
- name: Generate a script to update objects on the 'TEST' Db2 subsystem with DDL definitions in myddl.sql file broadcom.dbm_db2.compare_ddl: local_input_ddl_filename: myddl.sql target_db2: TEST
- name: Generate a script to update objects and apply a rule set for the matched objects broadcom.dbm_db2.compare_ddl: local_input_ddl_filename: myddl.sql target_db2: TEST rule_set: USER1.RULESET
- name: Generate a script to update objects and apply a rule set for the objects matched as determined by the local mask specifications in the pair.txt file broadcom.dbm_db2.compare_ddl: local_input_ddl_filename: myddl.sql target_db2: TEST match_set_file: pair.txt rule_set: USER1.RULESET
id: description: - Specifies the 1- to 8-character name of the RC/Migrator compare strategy that is created on the target Db2 subsystem by the execution of this command. - '' - 'Format: The name must begin with a non-numeric character, and can consist of the characters A to Z (uppercase only), 0 to 9, $, #, and @. ' required: false type: str host: description: - Host name of service on the mainframe. required: false type: str port: description: - Port number of service on the mainframe. required: false type: int user: description: - User name to authenticate to service on the mainframe. required: false type: str sqlid: description: - Specifies the authorization ID that is used as the value in generated SET CURRENT SQLID statements most of the time. required: false type: str authid: description: - Specifies the primary Db2 authorization ID (user ID) that is used to establish a connection between Db2 and a process. required: false type: str password: description: - Password to authenticate to service on the mainframe. required: false type: str protocol: choices: - http - https description: - Specifies the communication protocol to use between the zowe dbm-db2 client and the DBM Data Service. required: false type: str rule_set: description: - 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 . required: false type: str cert_file: description: - The file path to a certificate file to use for authentication. - '' - 'Note: The CLI does not support certificate files that require a password. For more information, search Troubleshooting PEM Certificates in Zowe Docs.' required: false type: path job_cards: description: - Specifies a string array of z/OS JCL JOB statements. elements: str required: false type: list match_set: description: - 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 and are both specified, specifications in match-set-file take precedence. ' required: false type: str change_set: description: - Specifies the creator and name of an existing RC/Migrator global change set used for modifying Db2 object attributes. Depending on the backend configuration, the changes apply to either ALL objects in the DDL or 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.' - '' - 'Consult with your database administrator about global change behavior for the default or a specific modification parameter. ' required: false type: str error_file: description: - Specifies the local output error file in YAML format that contains basic execution information, connection details, dbm-db2 profile parameters, used arguments, and errors that occurred during execution of the command. - ' ' - 'Default value: error.log ' required: false type: str target_db2: description: - Specifies the target Db2 subsystem or the data sharing group where the objects that you are comparing reside. - '' - ' Note: If you specify the data sharing group, the first active Db2 subsystem in the group is used. ' required: true type: str description: description: - Specifies a 1- to 25-character description for the RC/Migrator compare strategy. required: false type: str modification: description: - 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 . required: false type: str cert_key_file: description: - The file path to a certificate key file to use for authentication. required: false type: path match_set_file: description: - 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:' - '- <name> must be between 1 and 128 characters. For DATABASE and TABLESPACE, <name> must be between 1 and 8 characters.' - '- <schema> must be between 1 and 128 characters.' - '- <version> must be between 1 and 64 characters.' - ' ' - '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 and are both specified, specifications in match-set-file take precedence. ' required: false type: str change_set_file: description: - Specifies the name of the local input file that contains the global change specifications to modify Db2 object attributes. Depending on the backend configuration, the changes apply to either ALL objects in the DDL or 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\u2019s schema (creator) and\ \ tablespace names:" - '' - TBCR TEST% PROD% - TBTS TESTTS% PRODTS% - ' ' - 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.' - '' - 'Consult with your database administrator about global change behavior for the default or a specific modification parameter. ' required: false type: str environment_list: description: - Specifies an object of one or more values consisting of a Db2 subsystem ID and a DBM Data Service environment pair. The paired entry identifies the DBM Data Service environment to use for a subsystem that is accessible through multiple DBM Data Service environments. For more information about configuring the DBM Data Service, see the Database Management Solutions for Db2 for z/OS documentation at https://techdocs.broadcom.com/db2mgmt. required: false type: str output_impact_file: description: - Specifies the local output file name that contains the parseable impact analysis report in JSON or YAML format. This report helps identify significant DDL operations to be performed on Db2 objects. It provides the total number and type of DDL operations that are being performed on each object type, the list of DDL operations performed on each object instance, and the state of any pending changes. - '' - 'The report format is determined by the supplied file name extension: .json for JSON and .yaml or .yml for YAML. If no extension is provided, JSON format is used.' - ' ' - 'Default value: impact.json' - '' - 'For more information about the impact analysis report, see the RC/Migrator documentation at https://techdocs.broadcom.com/db2rcmig ' required: false type: str output_summary_file: description: - Specifies the local output file name that contains the change summary report in textual format. This report provides an overview of the changes to be performed to the Db2 objects on the target Db2 subsystem, but it does not describe how the changes are made. - ' ' - 'Default value: summary.txt ' required: false type: str reject_unauthorized: default: true description: - Reject self-signed certificates. required: false type: bool work_dataset_prefix: description: - Specifies the prefix that is used as the high level qualifier in z/OS work data set names. required: false type: str output_compare_script: description: - Specifies the local output file name that contains the update script to make changes to the target Db2 subsystem. - ' ' - 'Default value: compare.txt ' required: false type: str termination_character: description: - Specifies the SQL termination character that you want to use to terminate object DDL for triggers, XML indexes, functions, and procedures that contain embedded semicolon-terminated SQL statements. You cannot use a comma, an underscore, a single quote, double quotes, left parentheses, or right parentheses for this value. required: false type: str overwrite_output_files: description: - Specifies whether to overwrite output files when they already exist. required: false type: bool local_input_ddl_filename: description: - Specifies the local input file that contains DDL statements for the Db2 objects that you want to compare to Db2 objects on a target subsystem. Typically, this file is created by a 'zowe dbm generate ddl' command or retrieved from an archive. You can edit this file. required: true type: str
data: description: Data from the module execution (a data structure). The items of this dict are set as individual return values on the top level as well. elements: dict returned: when returned data is a dictionary type: list error: contains: additional_details: description: Detailed message about the failure. type: str msg: description: Short description of the result or failure. type: str request: description: HTTP method used to invoke API service request. returned: API request failed type: str resource: description: URI of the resource of the API service request. returned: API request failed type: str description: More details about why the action has failed. If the failure is when calling an API service, the response contains the connection parameters. returned: error type: complex failed: description: A boolean that indicates if the task was failed or not. returned: always type: bool list: description: Data from the module execution (a list of data structures). elements: dict returned: when returned data is a list type: list msg: description: Short description of the result or failure. returned: sometimes type: str rc: description: Exit code of the module, successful exit code is 0, failure is typically 1 or higher. returned: always type: int stderr: description: Details of the error. returned: error type: str stdout: description: Summary of the result. returned: success type: str