- pyDB2 does not understand how to create an uncataloged connection to Apache Derby
- This means we have to catalog the Apache Derby database server and database instance in the DB2 client
- This will be a little bit ugly... sorry. It will be over soon.
- 1. Inherit the DB2 instance environment:
bash$ . /home/db2inst1/sqllib/db2profile
- 2. From the command line, issue the following commands:
bash$ db2 CATALOG TCPIP NODE derby REMOTE localhost SERVER 1527 bash$ db2 CATALOG DATABASE MYDB AT NODE derby AUTHENTICATION SERVER
- 3. Test your connection to the Apache Derby database:
bash$ db2 CONNECT TO MYDB USER username USING password
With any luck, Apache Derby will accept the connection successfully.
- Your firewall may block access to your Apache Derby port.
- Ensure you have specified the right hostname, port number, and database name (in ).
- Check derby.log for a list of connection exceptions. You may need to install the IBM Java Runtime Environment for that specific set of Java Cryptographic Extensions (JCE).