Date Created: Tue 22-Jan-2008

Related Document Categories:

Get my WebSphere Application Server course here >> http://www.themiddlewareshop.com/products/


    Validated Oracle sample jdbc connection test

    "jdbc:oracle:thin:@hostname:1522:TEST","steve","steve"

    host:port:database:username:password

    really this means we have database test, schema steve with password steve


    JDBCVersion.javacmdsetup.bat

    import java.sql.*;
    import oracle.jdbc.driver.*;
    class JDBCVersion
    {
    public static void main (String args[])
    throws SQLException
    {
    // Load the Oracle JDBC driver
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    // Get a connection to a database
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@hostname:1522:TEST","steve","steve");
    // Create Oracle DatabaseMetaData object
    DatabaseMetaData meta = conn.getMetaData();
    // gets driver info:
    System.out.println("JDBC driver version is " + meta.getDriverVersion());
    }
    }

    Get my WebSphere Application Server course here >> http://www.themiddlewareshop.com/products/


Steve Robinson - IBM Champion 2013

About Me

Steve Robinson has been working in IT for over 20 years and has provided solutions for many large-enterprise corporate companies across the world. Steve specialises in Java and Middleware.

In January 2013, I was awarded the prestigous 'IBM Champion' accolade.


Read my books?

IBM WebSphere Application Server 8.0 Administration Guide

IBM WebSphere Application Server 8.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Categories

Other Categories