ORACLE-DB Connector
The Oracle DB connector can access the Oracle database by calling stored procedures or executing prepared statements. The following options determine which access method is used:
- Stored Procedures: Set the --executable option to the name and location of the stored procedure, or
- Prepared Statements: Set the --query option to the SQL statement.
Examples
ol test connection
[module folder]> ol test connection --url jdbc:oracle:thin:@solutions.openlegacy.com:1521/ORADOC.OPENLEGACY --username demo --password 12345 --query-timeout 3000 --pool-max-size 5 --use-time-zone-as-region false
[module folder]$ ol test connection --url jdbc:oracle:thin:@solutions.openlegacy.com:1521/ORADOC.OPENLEGACY --username demo --password 12345 --query-timeout 3000 --pool-max-size 5 --use-time-zone-as-region false
ol add for stored-procedure
[module folder]> ol add --executable DEMO.BANK_EXAMPLE.GET_ACCOUNT_BY_ID --overload 1
[module folder]$ ol add --executable DEMO.BANK_EXAMPLE.GET_ACCOUNT_BY_ID --overload 1
ol add for prepared statement
[module folder]> ol add --query "SELECT * FROM ACCOUNTS WHERE ID = ?" --operation-name account-by-id
[module folder]$ ol add --query "SELECT * FROM ACCOUNTS WHERE ID = ?" --operation-name account-by-id
Properties
--executable (required for stored procedure data fetching)
Database path to a stored procedure or function (required for an executable-based data fetch)
--executable DEMO.BANK_EXAMPLE.GET_ACCOUNT_BY_ID
--overload (required for stored procedure data fetching)
Determines the stored procedure to fetch when multiple procedures have the same name. Use integers (0 - n).
--overload 2
--query (required for prepared-statement data fetching)
SQL prepared statement
--query "SELECT * FROM ACCOUNTS WHERE ID = ?"
--operation-name (required for prepared-statement data fetching)
The name of the generated query-based asset
--operation-name mySpecialName
--url
The JDBC url
--url jdbc:oracle:thin:@solutions.openlegacy.com:1521/ORADOC.OPENLEGACY
--username
The database user
--username
--password
The database password
--password
--query-timeout
The query timeout (in milliseconds) of callable statements for stored procedures.
--query-timeout
--pool-max-size
Thread pool maximal size
--pool-max-size
--use-time-zone-as-region
timezone behavior style (false - default: old-style)
--use-time-zone-as-region
Updated 4 months ago