Oracle Express DB connection URL in Eclipse 3.2 via Database Profile - how?

Discussion in 'Java' started by ddog, Nov 10, 2006.

  1. ddog

    ddog Guest

    Hi,
    I'm trying to connect to a newly downloaded and installed Oracle 10g
    Express database via MyEclipse. I need to define a connection URL. The
    name of the database I want to connect
    to is 'HR' (the sample that comes with the installation). The username
    is 'SYSTEM' and the password is 'wgb1454'. I'm assuming the driver is a
    'thin' driver (see the URL below). The driver's
    package is oracle.jdbc.OracleDriver found in the ojdbc14.jar.

    jdbc:eek:racle:thin@//localhost:1521:HR,SYSTEM,wgb1454

    I'm also unable to connect via port 8080. The database is up and
    running. Any help would be greatly appreciated!
     
    ddog, Nov 10, 2006
    #1
    1. Advertising

  2. Not sure why you are trying to connect via port 8080. Assuming you
    installed oracle with defaults, the port will be 1521. Try this:

    DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());

    Connection conn = DriverManager.getConnection
    ("jdbc:eek:racle:thin:mad:localhost:1521:hr", "system",
    "wgb1454");

    System.out.println("Connected ? " + (conn != null ));
     
    Manish Pandit, Nov 10, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page