Connecting to Db2 is easy. Here are the steps:
- To add a new connection, navigate to the File tab and click on Edit Connections, or press [⌘ + O] | [Ctrl + O].
- In the dialog box, click the Add icon (➕) next to the Connections header and select Db2 Warehouse.
3. To finish creating a connection, enter valid data in the fields of the New connection dialog.
- Connection name – Replace the default New Connection with a meaningful value.
- Database JDBC DRIVER – Specify user drivers for the data source, or click the 'download them' link below this field settings area. For detailed instructions on setting up drivers, see Add a user driver to an existing connection.
- Host – Enter the hostname of your Db2 Warehouse server.
- Port – The default value is 50001.
- User and Password – Fill in your Db2 Warehouse credentials.
- Database – Select the database to connect to (BLUDB is the default).
- Schema – Select the existing schema with the default role that has specified privileges to use once your database is connected. To set a different schema for the session, execute the use schema command after connecting.
- SSL Connection – The default value is True. You can connect without SSL, but note that the connection details (port, string, etc.) depend on whether you use SSL.
- Autocommit – The default value is True.
- Connection timeout (sec) – Specify the value to tell the session when to disconnect.
- Advanced Properties – Supply additional JDBC parameters if needed.
- Click Test to ensure that the connection to the data source is successful.
- Click Save. A newly created connection will be displayed in your Database Explore panel just right under the Connections header.
🔎 NOTE: If you need more advanced information on how to set up a Db2 Warehouse connection, please, contact us through email@example.com
🔎 TIP: Here is the link with more recommendations from IBM
DB2 Stored Procedure and Function Parser
We learn to recognize the routine-like code as a single statement. Starting from Coginiti v22.03, running a script with multiple procedures or triggers (or any entity with a semicolon inside) is possible in all supported modes: at cursor, in a sequence, and as batch. Even if ‘$’ or ‘$$’ is present as part of the entity text, you don’t need to switch parameter parsing off. Moreover, you can specify parameters or session variables inside the statement.