{"id":5674,"date":"2013-12-19T15:34:10","date_gmt":"2013-12-19T07:34:10","guid":{"rendered":"http:\/\/onthe8spot.com\/?p=5674"},"modified":"2013-12-19T15:34:10","modified_gmt":"2013-12-19T07:34:10","slug":"db2-jdbc-driver-and-url-information","status":"publish","type":"post","link":"http:\/\/onthe8spot.com\/index.php\/2013\/12\/19\/db2-jdbc-driver-and-url-information\/","title":{"rendered":"DB2 JDBC Driver and URL Information"},"content":{"rendered":"<p>DB2 JDBC Driver and URL Information<br \/>\nListed below are connection examples for three common JDBC drivers for IBM DB2:<br \/>\nIBM DB2 Universal Driver Type 4<br \/>\nDRIVER CLASS: com.ibm.db2.jcc.DB2Driver<br \/>\nDRIVER LOCATION: db2jcc.jar and db2jcc_license_cu.jar<br \/>\n(Both of these jars must be included)<br \/>\nJDBC URL FORMAT: jdbc:db2:\/\/&lt;host&gt;[:&lt;port&gt;]\/&lt;database_name&gt;<br \/>\nJDBC URL Examples:<br \/>\njdbc:db2:\/\/127.0.0.1:50000\/SAMPLE<br \/>\nIBM DB2 Universal Driver Type 2<br \/>\nDRIVER CLASS: com.ibm.db2.jcc.DB2Driver<br \/>\nDRIVER LOCATION: db2jcc.jar and db2jcc_license_cu.jar<br \/>\n(Both of these jars must be included)<br \/>\nJDBC URL FORMAT: jdbc:db2:&lt;database_name&gt;<br \/>\nJDBC URL Examples:<br \/>\njdbc:db2:sample<br \/>\nApp JDBC Driver<br \/>\nIn order to be able to use the DB2 App driver, certain software must be installed on your machine. This usually entails installing the IBM DB2 Client software. See IBM&#8217;s site for more information.<br \/>\nDRIVER CLASS: COM.ibm.db2.jdbc.app.DB2Driver<br \/>\nDRIVER LOCATION: To use the App driver, the DB2 client software should be installed on your machine. The name of the file that contains the DB2 App driver is usually db2java.zip. However, this may change depending on the version of the client software that is installed. Usually, the DB2 client software is installed in the SQLLIB directory. For example, if you are using Windows, the following may be the location of the db2java.zip file: c:\\SQLLIB\\java12\\db2java.zip<br \/>\nJDBC URL FORMAT: jdbc:db2:&lt;database_name&gt;<br \/>\nJDBC URL Examples:<br \/>\njdbc:db2:test<br \/>\nNet JDBC Driver<br \/>\nDRIVER CLASS: COM.ibm.db2.jdbc.net.DB2Driver<br \/>\nDRIVER LOCATION: The DB2 Net drivers can be obtained by installing the DB2 client software from IBM. Depending on the version of the client software, the net drivers are usually contained in the db2java.zip file. For example, if using Windows, the following may be the location of the db2java.zip file that contains the drivers: c:\\SQLLIB\\java12\\db2java.zip<br \/>\nJDBC URL FORMAT: jdbc:db2:\/\/&lt;host&gt;:&lt;port&gt;\/&lt;database_name&gt;<br \/>\nThe default port for IBM DB2 is many times one of the following: 446, 6789, or 50000. Usually, if the default port is being used by the database server, the :&lt;port&gt; value of the JDBC url can be omitted.<br \/>\nJDBC URL Examples:<br \/>\njdbc:db2:\/\/neptune.acme.com:6789\/test<br \/>\njdbc:db2:\/\/127.0.0.1:6789\/test<br \/>\nvia <a href=\"http:\/\/razorsql.com\/docs\/help_db2.html\">DB2 JDBC Driver and URL Information<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>DB2 JDBC Driver and URL Information Listed below are connection examples for three common JDBC drivers for IBM DB2: IBM DB2 Universal Driver Type 4 DRIVER CLASS: com.ibm.db2.jcc.DB2Driver DRIVER LOCATION: db2jcc.jar and db2jcc_license_cu.jar (Both of these jars must be included) JDBC URL FORMAT: jdbc:db2:\/\/&lt;host&gt;[:&lt;port&gt;]\/&lt;database_name&gt; JDBC URL Examples: jdbc:db2:\/\/127.0.0.1:50000\/SAMPLE IBM DB2 Universal Driver Type 2 DRIVER &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/onthe8spot.com\/index.php\/2013\/12\/19\/db2-jdbc-driver-and-url-information\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;DB2 JDBC Driver and URL Information&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[79],"tags":[],"class_list":["post-5674","post","type-post","status-publish","format-standard","hentry","category-reposts"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/onthe8spot.com\/index.php\/wp-json\/wp\/v2\/posts\/5674","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/onthe8spot.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/onthe8spot.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/onthe8spot.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/onthe8spot.com\/index.php\/wp-json\/wp\/v2\/comments?post=5674"}],"version-history":[{"count":0,"href":"http:\/\/onthe8spot.com\/index.php\/wp-json\/wp\/v2\/posts\/5674\/revisions"}],"wp:attachment":[{"href":"http:\/\/onthe8spot.com\/index.php\/wp-json\/wp\/v2\/media?parent=5674"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/onthe8spot.com\/index.php\/wp-json\/wp\/v2\/categories?post=5674"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/onthe8spot.com\/index.php\/wp-json\/wp\/v2\/tags?post=5674"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}