setRdbcX stored procedure (Variation 2)
Defines a new data source connection on one or more endpoint nodes. This variation is intended for use with discrete parameters. The schema is DVSYS.
Input parameters
- src_type
- The type of this required parameter is VARCHAR(20). Specifies the data source type.
- host_name
- The type of this required parameter is VARCHAR(2000). Specifies the data source hostname.
- db_port
- The type of this required parameter is INTEGER. Specifies the network port of the data source service.
- database_name
- The type of this optional parameter is VARCHAR(128). Specifies the name of the database for the connection.
- connection_options
- The type of this optional parameter is VARCHAR(2000). Specifies a comma-delimited list of extra
options in the following format:
'<key1>=<value1>, <key2>=<value2>, ...'
. - user
- The type of this required parameter is VARCHAR(128). Specifies a database username .
- password
- The type of this unencrypted required parameter is VARCHAR(128). Specifies a database user password.
- use_SSL
- The type of this required parameter is INTEGER. Specifies whether the database connection uses SSL. Valid values are 0 (the connection does not use SSL) and 1 (the connection uses SSL).
- validate_cert
- The type of this required parameter is INTEGER. Specifies whether the endpoint validates the database server SSL certificate. Valid values are 0 (no validation) and 1 (validation is required).
- cert_host_name
- The type of this optional parameter is VARCHAR(2000). Specifies the name of the host that is associated with the SSL certificate. Specifying an empty string or the null value prevents hostname validation.
- SSL_certificate
- The type of this optional parameter is VARCHAR(32672). Specifies a database server certificate, if required.
- node_name
- The type of this required parameter is VARCHAR(32672). Specifies the names of the nodes on which the data source is defined.
- additional_options
- The type of this optional parameter is VARCHAR(32672). Specifies a comma-delimited list of extra
parameters in the following format:
'<key1>=<value1>, <key2>=<value2>, ...'
. Supported options include EDITCID, DRIVERID, and JWTTOKEN. If you specify EDITCID, existing connection information is replaced with the new information that you provide. For example:
DRIVERID (the ID of the driver that is to be downloaded) and JWTTOKEN (the Java web token) are used together when these parameters are set. The connector/endpoint downloads the driver from the server.call DVSYS.setRdbcX('old_dsDriver', 'old_dsUrl', 'old_usr', 'newP@ssw0rd', '', '', '', 'NodeIdForMyDB2', 'EDITCID=MYSQL11941', ?, ?, ?)
Output parameters
- connection_ID
- The type of this parameter is VARCHAR(20). Represents the generated connection ID for Data Virtualization.
- number_of_defined_connections
- The type of this parameter is INTEGER. Represents the total number of added connections.
- diagnostics
- The type of this parameter is VARCHAR(32672). Represents diagnostic output if a failure occurs.
Example
call DVSYS.setRdbcX('DB2','9.30.167.128','50000','TPCDS','','<user>','<password>','0','0','','','qpendpoint_1:6415','',?,?,?);
If you want to edit a data source with a new password, you can use the
additional_options parameter with
EDITCID.
call DVSYS.setRdbcX('DB2','9.30.167.128','50000','TPCDS','','<user>','<password>','0','0','','','qpendpoint_1:6415','EDITCID=DB2002',?,?,?);