Creating a jdbc DB2 connection data source
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2024 12:30 PM
I attempting to create a JDBC DB2 data source connection. I have followed the steps in the manual and uploaded the jar file db2jcc4.jar. I fill out the form and update the URL to match the URL in my sql client by adding securityMechanism=13; to the end of the URL.
jdbc:db2://hostname:50001/dnName:securityMechanism=13
I get the following java error:
MID Server reported error: SQLState: null
java.sql.SQLException: com.ibm.db2.jcc.am.SqlSyntaxErrorException: [jcc][10165][10051][4.18.60] Invalid database URL syntax: jdbc:db2://a70zpcpitdb1.bcbssc.com:50001/maxdb75:securityMechanism=13. ERRORCODE=-4461, SQLSTATE=42815
The table that I am querying is a simple view with 4 columns.
Any suggestions as to how to resolve this would be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2024 02:43 PM
jdbc:db2://hostname:50001/dnName:securityMechanism=13
jdbc:db2://<ServerName>:<Port>/<DatabaseName>:securityMechanism=Security_Mech_ID;
syntax looks good maxdb75 is this correct database name ? confirm universal driver is enabled on it...