0 / 0
setRdbcX stored procedure in Watson Query

setRdbcX stored procedure (Variation 1)

Defines a new data source connection on one or more endpoint nodes. This variation is intended for use with URL-based parameters. The schema is DVSYS.

Input parameters

driver
The type of this required parameter is VARCHAR(128). Specifies the data source driver class.
URI
The type of this required parameter is VARCHAR(2000). Specifies the data source connection URI.
user
The type of this optional parameter is VARCHAR(128). Specifies a data source username.
password
The type of this unencrypted optional parameter is VARCHAR(128). Specifies a data source password.
trust_store_location
The type of this optional parameter is VARCHAR(128). Specifies a placeholder in the URI for the actual location of the truststore that contains the certificate.
SSL_certificate
The type of this optional parameter is VARCHAR(32672). Specifies a data source server certificate, if required.
driver_ID
The type of this optional parameter is VARCHAR(128). Specifies the driver ID to use when you request a driver download from the API server.
node_name
The type of this required parameter is VARCHAR(32672). Specifies the names of the nodes on which the data source is defined.
Run the following query to find valid values for node_name.
SELECT * FROM DVSYS.LISTNODES;
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:
call DVSYS.setRdbcX('old_dsDriver', 'old_dsUrl', 'old_usr', 'newP@ssw0rd', '', '', '', 'NodeIdForMyDB2', 'EDITCID=MYSQL11941', ?, ?, ?)
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.
Access restrictions: Use this option to enable access restrictions Watson Query. Add the restrictions in the form of a nested comma-separated list of tuples specifying the type of access grantee (user, group, or role), and their names. For example:
ACCESS_RESTRICTION={U username, G groupname, R rolename}

Do not use quotation marks to wrap the names. For example, use ACCESS_RESTRICTION={G ALL USERS} instead of ACCESS_RESTRICTION={G "ALL USERS"}.

Output parameters

connection_ID
The type of this parameter is VARCHAR(20). Represents the generated connection ID for Watson Query.
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('com.ibm.jdbc.oracle.OracleDriver', 'jdbc:ibm:oracle://90.30.146.185:1521;serviceName=pdborcl.test.ibm.com', '<username>', '<password>', null, null, '', '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('com.ibm.jdbc.oracle.OracleDriver', 'jdbc:ibm:oracle://90.30.146.185:1521;serviceName=pdborcl.test.ibm.com', '<username>', '<new_password>', null, null, '', 'qpendpoint_1:6415', 'EDITCID=ORAC003', ?, ?, ?)"
Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more