Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to create db2 database using jdbc

sudeep_hsFeb 10 2015 — edited Feb 10 2015

Hi,

   I am not sure if this has been rectified for now.

I have an app trying to create a new database on latest DB2 . I use the connection string and the type 4 drivers as specified below.

jdbc:db2://<host ip>:50000/

com.ibm.db2.jcc.DB2Driver

db2jcc.jar is on the classpath

When attempting to get the DriverManager.getConnection using the connection string, i always get the "Invalid URL format" and the creation fails. Can anyone help in achieving this.

If i connect to an existing database like  jdbc:db2://<host ip>:50000/<dbName> , everything works smoothly.

Thanks

sudeep

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 10 2015
Added on Feb 10 2015
1 comment
657 views