RDBMS |
Scroll |
The RDBMS command provides the connection information required for a relational database management system (RDBMS). There can be only one RDBMS statement within a Apply Engine script and therefore only one RDBMS can be a source target or both. Both the Parser component and the Engine have the ability to connect to a relational database using the RDBMS command information. It is only necessary for SQDPARSE to connect to a database if the SQLDML Description type is used.
Note, since only one relational databases connection is supported at a time. It is not possible to use the SQLDML Description type for both a source and target Description unless they were both in the same database catalog. Similarly, an Apply Engine cannot use a CURSOR to access additional data from a relational DATASTORE unless the RDBMS is also the Target or the Target is not an RDBMS.
Syntax
RDBMS [ODBC | NATIVEORA | NATIVEDB2] <dbname> [<usernamem> | DUMMY] [<password> | DUMMY] [‘connect_string’];
Keyword and Parameter Descriptions
[ODBC] Specifies ODBC as the connection type to be used by the Parser and Engine at execution. ODBC can be used to connect to a variety of Relational databases but is most often used for connections to SQL Server
[NATIVEORA] – specifies a connection to an Oracle database using the Oracle supplied SQL*Net connection type.
[NATIVEDB2] – specifies a connection to a DB2 LUW (UDB) database using the IBM supplied connection type. On zOS, it is not necessary to specify the connection TYPE.
<dbname> This parameter specifies, in the case of DB2 and Oracle, the name of the relational database instance (SSID for Db2) that the Apply Engine will be connecting to during processing. When connecting to SQLServer or another RDBMS using ODBC, this parameter specifies the "Data Source Name" or DNS defined by the platform's ODBC configuration manager.
[<username> | DUMMY] Specifies the username that to be used to make the connection to the relational database. In the case of DB2, DUMMY must be used.
[<password > | DUMMY] Specifies the password that will be used during the connection to the relational database. In the case of DB2, DUMMY must be used. For other RDBMS connections, if the password parameter is not specified, the capture will attempt to connect using external authentication which in the case of Oracle will be Oracle Wallet. Two other alternatives for providing the password use the following Parameters which allow you to reduce or eliminate the visibility of the password.
[passcmd '<./getpassword.sh>'] Any script that will return the RDBMS user password.
[passfile '<./password.txt>'] A file containing the RDBMS user password that may be hidden from public view using permissions or other means.
[‘connect_string’] This optional parameter specifies additional information that may be required by certain relational database management systems in order to connect properly.
Example 1: Connecting to a Relational Database using ODBC
Connect to a relational database, EMPLOYEE_MASTER, using an ODBC connection with a User ID of U123 and a password of P456.
RDBMS ODBC EMPLOYEE_MASTER U123 P456;
Example 2: Connecting to a DB2 UDB Relational Database
Connect to a DB2 UDB relational database, HRMASTER, using the NATIVEDB2 Connection with a User ID of U789 and a password of P321.
RDBMS NATIVEDB2 HRMASTER U789 P321;
Example 3: Connecting to a Oracle Relational Database
Connect to an Oracle relational database, CUSTOMER, using a NATIVEORA Connection with a User ID of SQDCUST and a password of SQD2626.
RDBMS NATIVEORA CUSTOMER SQDCUST SQD2626;