Database
The Database allows you to connect to a database and perform database operations using a JDBC driver.
Creating a New Account
-
Click the Connectors.
-
Search for Database in the Available Connectors and select Database.
-
Click New account.
-
Provide the action name and description for the account in the Add account page.
- Enter the following details in the Add account wizard -
-
Name -Name for the account you want to add.
-
Description- Short description for the account you want to add.
-
Database - Database you want to connect to.
-
Driver Group - Driver group used to connect to the database. Lists the pre-bundled drivers available and the drivers uploaded in the Database connector. For more information, see Certified Databases and JDBC Driver Jars. You can upload a new JDBC driver by selecting the Add icon next to the Driver Group dropdown list. You can upload only certified jars. For more information, see Adding Driver.
-
DataSource Class - Datasource class to be used. This field specifies the name of the JDBC driver’s datasource class.
-
Server Name- Name of the server that hosts the database.
Note: If the tenant cannot connect to the cloud database, then check the security settings of the cloud database. -
User Name- Username associated with the account on the database server.
-
Password- Password for the specified user name.
-
Database Name- Name of the database to which you are connecting.
-
Port Number- Port number used for connecting to the database.
-
Truststore Alias - Alias of the truststore configuration. The truststore contains trusted certificates that are used to determine the trust for the remote server peer certificates. You can also add a new Truststore certificate by selecting the Add icon next to the Truststore Alias dropdown list. See more information on Work with projects .
-
Keystore Alias- Alias for the keystore configuration.
You can add a new Keystore certificate by selecting the Add icon next to the Keystore Alias dropdown list.
For more information, see Work with projects and How to generate a private-public key pair using OpenSSL.
Note: Two-Way SSL is supported in Database connector. For Two-Way SSL authentication, you must configure the Keystore Alias and Truststore Alias. See more information on Overview. -
Network Protocol- Network protocol that the connection must use when connecting to the database. Type TCP or TCPS to indicate the network protocol.
-
Other properties- Configure the Property Name and Property Value by selecting from the drop-down list or typing the name if not listed, and enter the corresponding value; click the ‘+’ button to add a new property.
- Property Name - Name of the property. You can select the property from the drop-down list or type the property name if it is not listed.
- Property Value - Value for the property.
Note: Properties listed for you to select from the dropdown list are driver-dependent.Example 1- Use this field to choose a property such as TableFilter. You can either select or type the TableFilter property in the dropdown list and enter the <current catalog>.Accounting in the input text field. Use {} to configure a combination of multiple key-value pairs.
Example 2 -
By default, the loginTimeout is set to 60, which is the time (seconds) that a connection waits while attempting to connect to a database. The <current catalog> represents the default catalog associated with an account. The <current schema> represents the default schema associated with an account.*connectionProperties={oracle.jdbc.V8Compatible=true,includeSynonymns=true }
-
-
- Click Next. The Add account > Advance Setting page appears.
- Provide the following details in Advance Setting page to configure
connection pooling manually -Note: Connection pooling is not enabled by default.
-
Enable connection pooling- Toggle the slider to the right to enable manual configuration of the connection pooling details. Disable the connection pooling to use system defined values.
- Minimum and maximum Pool Size- Minimum and maximum connection pool size for this account.Minimum Pool Size: Number of connections to create when the connection is enabled. The system maintains the specified Minimum Pool Size of connections, irrespective of whether these connections remain idle. Maximum Pool Size- Maximum number of connections that can exist at a time in the connection pool.
- Block timeout- Number of milliseconds that IBM® webMethods Integration waits to obtain a connection before it times out and returns an error. For example, you have a pool with maximum pool size of 20. In the event of receiving 30 simultaneous connection requests, 10 requests will be queued, awaiting a connection from the pool. If you set the Block timeout
value to 5000, the 10 requests will wait for 5 seconds to establish a connection before they time
out and return an error. If the services using the connections require 10 seconds to complete and
return connections to the pool, the pending requests will encounter failure and return an error
message stating the unavailability of the connections. If you set the Block timeout value too
high, you may encounter problems resulting in error. If a request contains errors that delay the
response, other requests will not be sent.
This Block timeout must be tuned in conjunction with the Maximum Pool Size setting to accommodate such bursts in processing.
- Expire timeout- Number of milliseconds that an inactive connection can
remain in the pool before it is closed and removed from the pool. The connection pool removes
inactive connections until the number of connections in the pool is equal to the Minimum Pool
Size. The timer for an inactive connection is reset when the connection is used. If you set the
Expire timeout value too high, the connection pool might accumulate numerous unused and
inactive connections. This not only consumes local memory but also ties up a connection on your
backend resource. This could have an adverse effect if your resource has a limited number of
connections. If you set the Expire timeout value too low, the performance could degrade
because of the increased activity of creating and closing connections.
This Expire timeout must be tuned in conjunction with the Minimum Pool Size setting to avoid excessive opening and closing of connections during processing.
-
- Click Next.
- Verify the details in the Account and Other Properties tab.
- Click Test connection to verify the database connection. A success message appears if the connectivity is successful.
- Review the account details and click Enable.
- Click Done. This will redirect you to the Predefined Connectors page containing the list of connectors created.
Points to Remember While Adding an Account
- Microsoft SQL Server
-
Select Truststore Alias from the dropdown list. If this option is not available in the dropdown list, then upload your certificate by selecting the '+' button next to the Truststore Alias dropdown list.
-
Set the Other Properties to
loginTimeout=60;encrypt=true
-
- Oracle
-
Select Truststore Alias from the dropdown list. If this option is not available in the dropdown list, then upload your certificate by selecting the '+' button next to the Truststore Alias dropdown list.
-
Set Network Protocol to tcps. The default value of tcps port is 2484.
-
- PostgreSQL
-
Select Truststore Alias from the dropdown list. If this option is not available in the dropdown list, then upload your certificate by selecting the '+' button next to the Truststore Alias dropdown list.
-
Set Network Protocol field is not mandatory for PostgreSQL account.
-
- MySQL
-
Select Truststore Alias from the dropdown list. If this option is not available in the dropdown list, then upload your certificate by selecting the '+' button next to the Truststore Alias dropdown list.
-
- Tibero
-
Select Truststore Alias from the dropdown list. If this option is not available in the dropdown list, then upload your certificate by selecting the '+' button next to the Truststore Alias dropdown list.
-
- SAP HANA
-
Select Truststore Alias from the dropdown list. If this option is not available in the dropdown list, then upload your certificate by selecting the '+' button next to the Truststore Alias dropdown list.
-
Set the Other Properties to
loginTimeout=60;encrypt=true;hostNameInCertificate=<host name>
-
- Amazon Redshift
-
Select Truststore Alias from the dropdown list. If this option is not available in the dropdown list, then upload your certificate by selecting the '+' button next to the Truststore Alias dropdown list.
-
Set the Other Properties to
loginTimeout=60;SSL=true;SSLMode=
-
- Snowflake
- Snowflake connections use SSL by default.
- The Database Connector supports key-based authentication only for Snowflake database.
- Select the Keystore Alias from the dropdown list. If this option is not available in the dropdown list, then upload your certificate by selecting the ’+’ button next to the Keystore Alias dropdown list.
- Set the following properties in Snowflake account keyPairAuthN=true and warehouse = COMPUTE_WH.
- Vertica
-
Select Truststore Alias from the dropdown list. If this option is not available in the dropdown list, then upload your certificate by selecting the '+' button next to the Truststore Alias dropdown list.
-
Adding Driver
The Add Driver screen gives you an option to upload a custom driver jar for a particular database. This uploaded driver can be used when you create an account.
To add a new driver
-
In the Account page, from the Driver Group, select the "+" button.
-
In the Add Driver page, select the supported Database.
-
Type the driver group name in the Driver Group.
-
Browse the jar in the Select the Driver field for a particular database. The driver jar gets uploaded for the corresponding database.
Note:- You can upload only certified jars. For more information, see Certified Databases and JDBC Driver Jars.
- The uploaded driver jars can be used across the projects in the tenant.
Pre-bundled Drivers
Pre-bundled driver jars are provided to connect to the databases like Microsoft SQL Server, Oracle, PostgreSQL. You cannot delete these pre-bundled driver group. The below table shows the driver groups and supported databases.
Driver Group | Supported Databases | Version |
---|---|---|
Progress® DataDirect®. | Microsoft SQL Server, Oracle | 5.1.4 |
Microsoft JDBC Driver for SQL Server Note: This field is not available for
connections on Edge Runtime.
|
Microsoft SQL Server | 4.0.0 |
PostgreSQL JDBC Driver Note: This field is not available for connections on Edge
Runtime.
|
PostgreSQL | 42.7.2 |
- If you use Progress® DataDirect® driver to create a Non-SSL connection for Microsoft SQL Server database, then set the Other Properties with
validateservercertificate=false;encryptionmethod=ssl
- For Oracle database, if you are using Progress® DataDirect® driver group to create a connection for Stored Procedure operation, then the Stored Procedure operation cannot fetch the metadata for SYS_CURSOR data type.
Certified Databases and JDBC Driver Jars
You can upload only the following list of certified driver jars:
JDBC Driver Jars for Microsoft SQL Server
Download Path : https://learn.microsoft.com/en-us/sql/connect/jdbc/release-notes-for-the-jdbc-driver?view=sql-server-ver16
Driver Version | Driver Jar Name | Java™ Version | Supported DB Versions |
---|---|---|---|
4.1 | sqljdbc41.jar | 7 | Microsoft SQL Server 2008, 2012, 2014, 2016 and Azure SQL Database |
4.2 | sqljdbc41.jar | 7 | Microsoft SQL Server 2008, 2012, 2014, 2016 and Azure SQL Database |
4.2 | sqljdbc42.jar | 8 | Microsoft SQL Server 2008, 2012, 2014, 2016 and Azure SQL Database |
6.0 | sqljdbc41.jar | 7 | Microsoft SQL Server 2008, 2012, 2014, 2016 and Azure SQL Database |
6.0 | sqljdbc42.jar | 8 | Microsoft SQL Server 2008, 2012, 2014, 2016 and Azure SQL Database |
6.2.2 | mssql-jdbc-6.2.2.jre7.jar | 7 | Microsoft SQL Server 2008, 2012, 2014, 2016, 2017, and Azure SQL Database |
6.2.2 | mssql-jdbc-6.2.2.jre8.jar | 8 | Microsoft SQL Server 2008, 2012, 2014, 2016, 2017 and Azure SQL Database |
6.4.0 | mssql-jdbc-6.4.0.jre7.jar | 7 | Microsoft SQL Server 2008, 2012, 2014, 2016, 2017 and Azure SQL Database |
6.4.0 | mssql-jdbc-6.4.0.jre8.jar | 8 | Microsoft SQL Server 2008, 2012, 2014, 2016, 2017 and Azure SQL Database |
7.0.0 | mssql-jdbc-7.0.0.jre8.jar | 8 | Microsoft SQL Server 2008, 2012, 2014, 2016, 2017 and Azure SQL Database |
7.2.2 | mssql-jdbc-7.2.1.jre8.jar | 8 | Microsoft SQL Server 2008, 2012, 2014, 2016, 2017 and Azure SQL Database |
7.4.1 | mssql-jdbc-7.4.1.jre8.jar | 8 | Microsoft SQL Server 2008, 2012, 2014, 2016, 2017 and Azure SQL Database |
8.2 | mssql-jdbc-7.2.1.jre8.jar | 8 | Microsoft SQL Server 2008, 2012, 2014, 2016, 2017, 2019 and Azure SQL Database |
8.4 | mssql-jdbc-7.2.1.jre8.jar | 8 | Microsoft SQL Server 2008, 2012, 2014, 2016, 2017, 2019 and Azure SQL Database |
9.2 | mssql-jdbc-7.2.1.jre8.jar | 8 | Microsoft SQL Server 2008, 2012, 2014, 2016, 2017, 2019 and Azure SQL Database |
12.6 | mssql-jdbc-12.6.0.jre8.jar | 8 | Microsoft SQL Server 2022 |
JDBC Driver Jars for Oracle
Download Path: https://www.oracle.com/in/database/technologies/appdev/jdbc-downloads.html
Driver Version | Driver Jar Name | Java Version | Supported DB Versions |
---|---|---|---|
12.1.0.1 | ojdbc6.jar | 6 | Oracle 12.1, 12.2, 18.3, 19.x |
12.1.0.1 | ojdbc7.jar | 7,8 | Oracle 12.1, 12.2, 18.3, 19.x |
12.1.0.1 | xdb6.jar | 6,7 | Oracle 12.1, 12.2, 18.3, 19.x |
12.1.0.1 | xmlparserv2-12.1.0.1.jar | Oracle 12.1, 12.2, 18.3, 19.x | |
12.1.0.2 | ojdbc6.jar | 6 | Oracle 12.1, 12.2, 18.3, 19.x |
12.1.0.2 | ojdbc7.jar | 7,8 | Oracle 12.1, 12.2, 18.3, 19.x |
12.1.0.2 | xdb6.jar | 6,7 | Oracle 12.1, 12.2, 18.3, 19.x |
12.1.0.2 | xmlparserv2-12.1.0.2.jar | Oracle 12.1, 12.2, 18.3, 19.x | |
12.2.0.1 | ojdbc8.jar | 8 | Oracle 12.1, 12.2, 18.3, 19.x |
12.2.0.1 | xdb6.jar | 7,8 | Oracle 12.1, 12.2, 18.3, 19.x |
12.2.0.1 | xmlparserv2-12.2.0.1.jar | Oracle 12.1, 12.2, 18.3, 19.x | |
18.3 | ojdbc8.jar | 8,9,11 | Oracle 12.1, 12.2, 18.3, 19.x |
18.3 | xdb6.jar | Oracle 12.1, 12.2, 18.3, 19.x | |
19.3 | ojdbc8.jar | 8,9,11 | Oracle 12.1, 12.2, 18.3, 19.x |
19.3 | xdb6.jar | Oracle 12.1, 12.2, 18.3, 19.x | |
19.6 | ojdbc8.jar | 8,9,11 | Oracle 12.1, 12.2, 18.3, 19.x |
19.6 | xdb6.jar | Oracle 12.1, 12.2, 18.3, 19.x | |
19.6 | xmlparserv2.jar | Oracle 12.1, 12.2, 18.3, 19.x | |
19.7 | ojdbc8.jar | 8,9,11 | Oracle 12.1, 12.2, 18.3, 19.x |
19.7 | xdb6.jar | Oracle 12.1, 12.2, 18.3, 19.x | |
19.7 | xmlparserv2.jar | Oracle 12.1, 12.2, 18.3, 19.x | |
19.8 | ojdbc8.jar | 8,9,11 | Oracle 12.1, 12.2, 18.3, 19.x |
19.8 | xdb6.jar | Oracle 12.1, 12.2, 18.3, 19.x | |
19.8 | xmlparserv2.jar | Oracle 12.1, 12.2, 18.3, 19.x | |
19.9 | ojdbc8.jar | 8,9,11 | Oracle 12.1, 12.2, 18.3, 19.x |
19.9 | xdb6.jar | Oracle 12.1, 12.2, 18.3, 19.x | |
19.9 | xmlparserv2.jar | Oracle 12.1, 12.2, 18.3, 19.x |
JDBC Driver Jars for PostgreSQL
Download Path: https://jdbc.postgresql.org/download/
Driver Version | Driver Jar Name | Java Version | Supported DB Versions |
---|---|---|---|
42.2.5 | postgresql-42.2.5.jre6.jar | 6 | Aurora PostgreSQL (Compatible with PostgreSQL 9.6.8, 9.6.9, 10.4, 10.5, 10.6) |
42.2.5 | postgresql-42.2.5.jre7.jar | 7 | Aurora PostgreSQL (Compatible with PostgreSQL 9.6.8, 9.6.9, 10.4, 10.5, 10.6) |
42.2.5 | postgresql-42.2.5.jar | 8 | Aurora PostgreSQL (Compatible with PostgreSQL 9.6.8, 9.6.9, 10.4, 10.5, 10.6) |
42.2.6 | postgresql-42.2.6.jre6.jar | 6 | Aurora PostgreSQL (Compatible with PostgreSQL 9.6.8, 9.6.9, 10.4, 10.5, 10.6) |
42.2.6 | postgresql-42.2.6.jre7.jar | 7 | Aurora PostgreSQL (Compatible with PostgreSQL 9.6.8, 9.6.9, 10.4, 10.5, 10.6) |
42.2.6 | postgresql-42.2.6.jar | 8 | Aurora PostgreSQL (Compatible with PostgreSQL 9.6.8, 9.6.9, 10.4, 10.5, 10.6) |
42.2.7 | postgresql-42.2.7.jre6.jar | 6 | Aurora PostgreSQL (Compatible with PostgreSQL 9.6.8, 9.6.9, 10.4, 10.5, 10.6) |
42.2.7 | postgresql-42.2.7.jre7.jar | 7 | Aurora PostgreSQL (Compatible with PostgreSQL 9.6.8, 9.6.9, 10.4, 10.5, 10.6) |
42.2.7 | postgresql-42.2.7.jar | 8 | Aurora PostgreSQL (Compatible with PostgreSQL 9.6.8, 9.6.9, 10.4, 10.5, 10.6) |
42.2.8 | postgresql-42.2.8.jar | 8 | Aurora PostgreSQL (Compatible with PostgreSQL 9.6.8, 9.6.9, 10.4, 10.5, 10.6) |
42.2.17 | postgresql-42.2.17.jar | 8 | Aurora PostgreSQL (Compatible with PostgreSQL 8.2 or newer) |
42.2.18 | postgresql-42.2.18.jar | 8 | Aurora PostgreSQL (Compatible with PostgreSQL 8.2 or newer) |
42.7.2 | postgresql-42.7.2.jar | 8 | Aurora PostgreSQL (Compatible with PostgreSQL 9.6.8, 9.6.9, 10.4, 10.5, 10.6) |
JDBC Driver Jars for MySQL
Download Path: https://downloads.mysql.com/archives/c-j/
Driver Version | Driver Jar Name | Java Version | Supported DB Versions |
---|---|---|---|
8.0.15 | mysql-connector-java-8.0.15.jar | 8 | MySQL 8.0, 5.7, 5.6, and 5.5 |
8.0.16 | mysql-connector-java-8.0.16. jar | 8 | MySQL 8.0, 5.7, 5.6, and 5.5 |
8.0.17 | mysql-connector-java-8.0.17.jar | 8 | MySQL 8.0, 5.7, 5.6, and 5.5 |
8.0.22 | mysql-connector-java-8.0.22.jar | 8 | MySQL 8.0, 5.7, 5.6 |
8.0.23 | mysql-connector-java-8.0.23.jar | 8 | MySQL 8.0, 5.7, 5.6| |
JDBC Driver Jars for MariaDB
Download Path: http://downloads.mariadb.com/Connectors/java/
Driver Version | Driver Jar Name | Java Version | Supported DB Versions |
---|---|---|---|
2.3.0 | mariadb-java-client-2.3.0.jar | 8 | MariaDB 10.3.8 |
2.4.3 | mariadb-java-client-2.4.3.jar | 8 | MariaDB 10.3.8 |
2.5.4 | mariadb-java-client-2.5.4.jar | 8 | All MariaDB versions |
2.7.1 | mariadb-java-client-2.7.1.jar | 8 | All MariaDB versions |
2.7.2 | mariadb-java-client-2.7.2.jar | 8 | All MariaDB versions |
JDBC Driver Jars for Tibero
Download Path: The driver jar is available in the Tibero 6 installation directory, ($TB_HOME/client/lib/jar).
Driver Version | Driver Jar Name | Java Version | Supported DB Versions |
---|---|---|---|
6.0 | tibero6-jdbc.jar | Tibero 6 |
JDBC Driver Jars for SAP HANA
Download Path: https://repo1.maven.org/maven2/com/sap/cloud/db/jdbc/ngdbc/
Driver Version | Driver Jar Name | Java Version | Supported DB Versions |
---|---|---|---|
2.8.11 | ngdbc-2.8.11.jar | 8 | All SAP HANA versions |
2.8.12 | ngdbc-2.8.12.jar | 8 | All SAP HANA versions |
2.8.14 | ngdbc-2.8.14.jar | 8 | All SAP HANA versions |
JDBC Driver Jars for Amazon Redshift
Download Path: https://docs.aws.amazon.com/redshift/latest/mgmt/jdbc20-previous-driver-version-20.html
Driver Version | Driver Jar Name | Java Version | Supported DB Versions |
---|---|---|---|
1.2.53 | RedshiftJDBC42-no-awssdk-1.2.53.1080.jar | 8 | All Amazon Redshift versions |
1.2.54 | RedshiftJDBC42-no-awssdk-1.2.54.1082.jar | 8 | All Amazon Redshift versions |
2.0.0.3 | redshift-jdbc42-2.0.0.3.jar | 8 | All Amazon Redshift versions |
2.0.0.4 | redshift-jdbc42-2.0.0.4.jar | 8 | All Amazon Redshift versions |
JDBC Driver Jars for Snowflake
Download Path: https://repo1.maven.org/maven2/net/snowflake/snowflake-jdbc/
Driver Version | Driver Jar Name | Java Version | Supported DB Versions |
---|---|---|---|
3.9.2 | snowflake-jdbc-3.9.2.jar | 8 | All Snowflake versions |
3.12.15 | snowflake-jdbc-3.12.15.jar | 8 | All Snowflake versions |
3.12.16 | snowflake-jdbc-3.12.16.jar | 8 | All Snowflake versions |
3.12.17 | snowflake-jdbc-3.12.17.jar | 8 | All Snowflake versions |
JDBC Driver Jars for Vertica
Download Path: https://www.vertica.com/download/vertica/client-drivers/
Driver Version | Driver Jar Name | Java Version | Supported DB Versions |
---|---|---|---|
9.3.1 | vertica-jdbc-9.3.1-0.jar | 8 | All Vertica versions |
10.0.1 | vertica-jdbc-10.0.1-0.jar | 8 | All Vertica versions |
10.1.1 | vertica-jdbc-10.1.1-0.jar | 8 | All Vertica versions |
JDBC Driver Jars for Teradata Vantage
Download Path: https://downloads.teradata.com/download/connectivity/jdbc-driver
Driver Version | Driver Jar Name | Java Version | Supported DB Versions |
---|---|---|---|
16.2 | terajdbc4.jar | 8 | All Teradata Vantage versions |
17.0 | terajdbc4.jar | 8 | All Teradata Vantage versions |
17.1 | terajdbc4.jar | 8 | All Teradata Vantage versions |
JDBC Driver Jars for DB2®
Download Path: https://www.ibm.com/support/pages/db2-jdbc-driver-versions-and-downloads-db2-zos
Driver Version | Driver Jar Name | Java Version | Supported DB Versions |
---|---|---|---|
4.26.14 | db2jcc4.jar | 8, 9, 11 | 11.5.9.0 |
Database connector Actions
To use Database connector, you must select the actions to execute. Actions allow you to connect to the database and initiate an action on the database from IBM webMethods Integration.
You call database actions to perform database operation on tables, views, or synonyms. The database actions are performed by calling JDBC APIs.
Actions are based on templates provided with Database connector. Each template represents an SQL statement for performing an action on a database. For example, use Select action to retrieve specified information from the database tables.
Creating a new action from a template is straightforward. You have to create an account for creating a new action. When creating a new action, select the action template and configure the action using the wizards.
Database connector provides the following action templates:
-
Select: Retrieves specified information from the database table.
-
Insert: Inserts new information into a database table.
-
Update: Updates the existing information in a database table.
-
Delete: Deletes rows from a database table.
-
Stored Procedure: Calls a stored procedure. It obtains the stored procedure's input/output parameters by introspecting when you configure the action.
-
Batch Insert: Inserts new information into a database table. Use this action when you insert a large volume of data into a single table.
-
Batch Update: Updates the existing information in a database table. Use this action when you update a large volume of data in a single table.
-
Custom SQL: Defines and executes custom SQL to perform database operations. You can run almost any SQL statement required, such as data management statements and data definition statements. The following table describes the restrictions when creating an SQL query statement:
- Specify the table alias along with the table name if the SQL query contains more than one
table.
select d.deptno, e.empno from dept d,emp e where d.deptno = ?
- Use different column name alias for columns in the SQL
query.
select firstname as f_name, lastname as l_name from emp
- Column names in the SQL query should not be enclosed in
quotes.
select partno as partno from emp where partno=1
- Use the "as" keyword when you specify an alias for a
column.
select city as dummy from emp
- Irrespective of the database type, the query syntax must follow the SQL
standards.
insert into example_default_now set id=?, data=?
- Specify the table alias along with the table name if the SQL query contains more than one
table.
- You can use a CustomSQL to call a stored procedure only when the stored procedure does not have any OUT/INOUT or return parameters. If you need to use these parameters, use the StoredProcedure template.
- Standards corresponding to specific database types are not supported.
- If you use the ? variable placeholders in your SQL statement, ensure that you enter the corresponding Input Field and field type information in the same order as they appear in your SQL statement.
- Do not end your SQL statement with a semi-colon \(;\) or an exception will be generated at run time.
- Dynamic SQL: Configures a dynamic SQL statement, part of which you set at run time using input fields. At run time, the Dynamic SQL action will create the SQL statement by combining the contents of the input fields and then executing it. This is useful when you need the flexibility to set all or part of a SQL statement at run time, instead of at design time. DynamicSQL uses $ to map a part of the SQL statement to the input field. At design time, the action template generates an input field with INPUT_FIELD_NAME. At run time, the Dynamic SQL action parses the statement and replaces the $ with the actual contents of the input field. For variable names, use the ? variable placeholder for each variable. For example:
select employee_name where StaffID = ? and Dept = ?
Example 1:
select * from table1 ${where}
At run time, the *where* input field is set to *where col1 > 100*. The final SQL query will be:
select * from table1 where col1 > 100
Example 2:
select * from table1 ${where}
At run time, the *where* input field is set to *where col1 > ?*. As you are using placeholder *?* to receive input value for *col1*, you need to configure an input field to set value for column *col1*. The final SQL query will be:
select * from table1 where col1 > ?
Example 3:
<pre><code>select ${output_fields} from table1 ${where}</code></pre><br/>
At run time, the *where* input field is set to *where col1 > 100 * and *output_fields* input field is set to * col1,col2,col3 *. The final SQL query will be:
select col1,col2,col3 from table1 where col1>100
- Database connector does not validate the input parameters of a DynamicSQL action for any malicious SQL injections. When you use a variable input parameter such as the text $ in the SQL statement, you must take extra measures to avoid potential security risks.
- You can use a DynamicSQL to call a stored procedure only when the stored procedure does not have any OUT/INOUT or return parameters. If you need to use these parameters, use the StoredProcedure template.
- f you use the ? variable placeholders in your SQL statement, ensure that you enter the corresponding Input Field and field type information in the same order as they appear in your SQL statement.
- Do not end your SQL statement with a semi-colon (;) or an exception will be generated at run time.
Advanced Options
The following options provide additional capabilities for Database operations:
Parameter | Description |
---|---|
Select Distinct | Select the toggle button to suppress the duplicate rows in the query
output. Note: This option is applicable only for Select operation.
|
Convert selected to String |
Select the toggle button to convert the fields with input or output data type to java.lang.String. The selected fields are automatically converted to a String data type. It does not impact the fields which cannot be converted to String data type. Note: This option is applicable for Select, Insert, Update, Delete, Batch Insert, and Batch Update
operations.
|
Use SQL Expression (Advanced) |
Use the following formats to provide SQL expressions:
Note: This option is applicable for Select, Update, Delete, and Batch Update operations.
|
Configuring the Parameter Values
CRUD Actions and Stored Procedures
You can configure the following parameters for custom SQL, Select, Update, Insert, Delete actions and Stored Procedures:
Parameter | Description |
---|---|
Query Time Out | Type or Select the query time out value in seconds. This field specifies the
number of seconds the database connection will wait for a SQL statement. Note: Leave blank if you do
not want to specify the Query Time Out.
|
Maximum Row |
Type the number of rows to be retrieved from a database table. Note:
|
Row Count Field Name |
|Type the field name of the Row Count Field. This field specifies the name of the output field whose value contains the number of affected rows while executing an SQL query. Note: This parameter is not available in Stored Procedures.
|
Row Count Field Type |
| | |Select the data type of the Row Count Field. Note: This parameter is not available in Stored Procedures.
|
Batch Operation
You can configure the following parameters for Batch Insert and Batch Update operations:
Parameter | Description |
---|---|
Query Time Out | Type or Select the query time out value in seconds. This field specifies the
number of seconds the database connection will wait for a SQL statement to execute. Note: Leave blank
if you do not want to specify the Query Time Out.
|
Batch Result Output Name |
Type the output name of the Batch Result Output Name. The output of the batch operation is a
string list. Elements in the list appear in the order in which you add the Insert SQL queries for
execution in the batch mode. Depending on the JDBC driver you use, the elements in the list contains
one of the following values:
|
JDBC Data Type to Java Data Type Mappings
Each column in the database table is assigned a SQL type. The JDBC driver maps each SQL data type to a JDBC data type. Database connector then maps each JDBC data type to one or more Java data types that are used as the input or output of the database actions.
The following table shows the JDBC data type to Java data type mappings. You can map each JDBC data type to a set of Java data types by choosing one from the set. The JDBC data type you select during configuration will then map to the input or output of the database actions.
For a list of data types for which Database connector has some constraints, see the JDBC Data Type to Java Data Type Mapping Constraints section.
-
Database connector does not support the TIMESTAMP WITH TIME ZONE and TIMESTAMP WITH LOCAL TIME ZONE data types in Oracle 10g.
-
Database connector does not support user-defined data types, Oracle PL/SQL collections, or Oracle PL/SQL records.
-
UROWID data type is not supported for Oracle database.
-
If the DATE JDBC type contains String as Java type, then the date format which Database connector accepts is YYYY-MM-DD.
JDBC Data Type | Java Data Type |
---|---|
ARRAY |
|
BIT |
|
TINYINT |
|
SMALLINT |
|
INTEGER |
|
BIGINT |
|
FLOAT |
|
REAL |
|
BOOLEAN |
|
DOUBLE |
|
NUMERIC |
|
DECIMAL |
|
CHAR |
|
VARCHAR |
|
LONGVARCHAR |
|
DATE |
|
TIME |
|
TIMESTAMP |
|
TIMESTAMP WITH TIME ZONE | -- |
TIMESTAMP WITH LOCAL TIME ZONE | -- |
BINARY |
|
VARBINARY |
|
LONGVARBINARY |
|
LONGNVARCHAR |
|
NCHAR |
|
NULL |
|
NVARCHAR |
|
CLOB |
|
BLOB |
|
ORACLECURSOR |
|
ORACLEFIXED_CHAR |
|
STRUCT |
|
OTHER |
|
Important Considerations When Using BLOB and CLOB Data Types
- When passing large CLOB or BLOB data, use the Java data types java.io.Reader for CLOB and java.io.InputStream for BLOB to prevent Database connector from running out of memory. When using these data types, Database connector streams the data into bytes thus allowing to pass large data. The data types java.io.Reader and java.io.InputStream are supported only for the Oracle database using the Oracle driver.
- When using the CLOB data with java.io.Reader as input data type, it is recommended that you use the InputStreamReader implementation of java.io.Reader with the correct encoding parameter.
- When IBM webMethods Integration executes a SELECT operation that has its output type set to java.sql.Blob for a BLOB data type, IBM webMethods Integration issues a java.io.NotSerializableException error.
Important Considerations When Using the Array and Struct Database Specific Data Types
- In database operation, when using the java.lang.Object as the output field type for a database column of type ARRAY or STRUCT, Database connector returns the data as a java.lang.Object array, provided that the ARRAY or STRUCT data in the database table is composed of primitive data types.
- When using the java.sql.Array or java.sql.Struct as the output field type for a database column
of type ARRAY or STRUCT, Database connector returns the java.sql.Array and the java.sql.Struct
objects, respectively, as returned by the driver. However, when serializing the data across the
JVMs, this returned data may not be serializable and may result into a
java.io.NotSerializableException. Therefore, before serializing the data across the JVMs, it is
important that you process the java.sql.Struct and java.sql.Array objects as required, and then drop
them from the pipeline.Note: The java.sql.Struct and java.sql.Array data types are available only for Database connector operations.
Using the SetAsString Data Type in Database connector
The SetAsString data type is a dummy string data type. When using this data type, Database connector does not try to convert the input data into the equivalent JDBC data type, but passes the data to the underlying database driver as a string data type. Thus, you have the flexibility to specify the format of the equivalent JDBC data type by using a database specific function.
For example, you can specify the format for date, time, or timestamp using the to_date function or a similar database function for Oracle database. Database connector treats the input data as a string data type and does not convert it to the equivalent JDBC data type. The to_date function then uses the string data to provide the required format of the date, time or timestamp.
If your database has native database specific functions that can convert string data type to any other data type, you may use the SetAsString data type.
JDBC Data Type to Java Data Type Mapping Constraints
Database connector has some constraints when mapping JDBC data types to Java data types.
If you select one of the following Java data types, the data type will map exactly to the Input/Output of operation:
- java.lang.String
- java.lang.Byte
- java.lang.Boolean
- java.lang.Character
- java.lang.Double
- java.lang.Float
- java.lang.Integer
- java.lang.Long
- java.lang.Short
- java.util.Date
- java.math.BigDecimal
- java.math.BigInteger
- java.lang.Object
The data types that are not included in this list are mapped to java.lang.Object. In these cases, if the JDBC data type you specify is for input, you need to pass in the object with the selected Java data type. If the JDBC type is for output, you can cast the object to the selected Java data type.
Database Connector Notifications
For more information about Database notifications, see About polling notifications.
Supported Cloud Databases
The following table lists the supported cloud databases:
Cloud Database | Database Version |
---|---|
Microsoft Azure | Microsoft SQL Azure (RTM) - 12.0.2000.8 |
Amazon RDS Oracle | Oracle 12c, Version 12.1.0.2 |
Amazon RDS MS SQL Server | SQL Server 2016 SP1 CU7 13.00.4466.4, released |
AWS Aurora PostgreSQL | Aurora PostgreSQL 10.6 |
AWS Aurora MySQL | Aurora MySQL 5.7.12 |
Amazon RDS MariaDB | MariaDB 10.3.8 |
Tibero on Amazon EC2 | Tibero 6 |
Limitations
General limitations
- In stored procedure notifications, parameter types IN, INOUT, and ORACLE CURSOR (INOUT) are not supported.
Amazon Redshift
- Actions not supported
- Stored Procedure
- Notifications not supported
- Insert Notifications
- Update Notifications
- Delete Notifications
- StoredProcedure Notifications
MariaDB
- Notifications:
- Trigger conditions not supported in Update and Delete Notifications.
- If you configure an operation for MariaDB using the driver versions greater than or equal to 2.4.0, select the table under <current catalog>.
Microsoft SQL
- Notifications:
- Trigger conditions not supported in Update and Delete Notifications.
- Microsoft SQL 2000 and 2005 do not allow the retrieval of both the old and the new values in a single Update notification. The notification can retrieve either the old or the new value.
- The WHERE tab is not supported in Insert and Update notification. An exception is generated if you try to use this tab.
Driver | Database | Limitations |
Microsoft JDBC Driver Version 2.2.0019 | Microsoft SQL Server 2000 |
|
Microsoft JDBC Driver Version 1.0.809.102 | Microsoft SQL Server 2005 |
|
DataDirect Connect | Microsoft SQL Server 2000 |
|
Microsoft SQL Server JDBC Driver 3.0 and 4.0 | Microsoft SQL Azure |
|
MySQL
- Notifications:
- Trigger conditions not supported in Update and Delete Notifications.
- MySQL version 5.0.x does not support multiple triggers with the same event (insert, delete, or update) for one table. Hence, with a MySQL database, when using an Insert, Update, or Delete Notification to monitor a table, you must disable the notification before you can enable another Insert, Update, or Delete Notification with the respective (insert, delete, or update) operation for the same table.
- When using an Update Notification with a MySQL database, updating any database field with the same value will not invoke a trigger.
Oracle
- Notifications:
- Trigger conditions not supported in Update and Delete Notifications.
- In the WHERE tab, if you use a CHAR(n) data type and enter a value in the Input Field, then the JDBC data type is automatically set to ORACLEFIXED_CHAR.
Driver | Database | Limitations |
|
All supported Oracle databases |
|
|
All supported Oracle databases |
|
|
|
|
PostgreSQL
PostgreSQL 11.2 and PostgreSQL 11.5:
- Actions not supported
- Stored Procedure
- Notifications not supported
- Insert Notifications
- Update Notifications
- Delete Notifications
- StoredProcedure Notifications
- If you configure an operation to select a table, you must always select the table under <current catalog>.
SAP HANA
- Notifications:
- Trigger conditions not supported in Update and Delete Notifications.
- SAP HANA requires Tunnelling while using SAP HANA Cloud Platform SDK Version 1.82.21.2.
- Metadata lookup for ARRAY data type is not supported. Only CustomSQL and DynamicSQL actions can be used to perform operations using these data types.
- SAP HANA trigger definition does not support the WHERE clause thereby rendering the WHERE tab in Insert, Update, Delete Notification useless.
- StoredProcedure Action and StoredProcedure Notification do not support ResultSet.
JDBC driver for SAP HANA2
- SSL connection is supported using SAP HANA file-based trust stores (PSEs).
Snowflake
- Actions not supported
- Stored Procedure
- Notifications not supported
- Insert Notifications
- Update Notifications
- Delete Notifications
- StoredProcedure Notifications
Teradata Vantage
- Actions not supported
- Stored Procedure
- Notifications not supported
- Insert Notifications
- Update Notifications
- Delete Notifications
- StoredProcedure Notifications
Tibero
- Actions not supported
- Stored Procedure
- Notifications not supported
- Insert Notifications
- Update Notifications
- Delete Notifications
- StoredProcedure Notifications
Vertica
- Actions not supported
- Stored Procedure
- Notifications not supported
- Insert Notifications
- Update Notifications
- Delete Notifications
- StoredProcedure Notifications
Deploy Anywhere Flow Services
-
Only JDBC jars certified by IBM for the database driver are permitted for uploading with deploy anywhere flow services.
-
The following databases are supported:
-
Amazon Redshift
-
MariaDB
-
Microsoft SQL Server
-
MySQL
-
Oracle
-
PostgreSQL
-
SAP HANA
-
Snowflake
-
Teradata Vantage
-
Tibero
-
Vertica
-
-
The following features are not supported:
-
Connection pool configuration
-
One-way SSL due to lack of SSL keystore deployment
-
Polling notifications
-
Kerberos-based authentication
-
Templates
- Execute service
- Stored procedure without signature
-