Re: JDBC connection using externally identified user

  • From: "Peter Hitchman" <pjhoraclel@xxxxxxxxx>
  • To: oracle-l <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 26 Oct 2007 10:13:46 +0100

Hi,
I hit the same issue and after I allowed the database to allow remote OS
authentication this worked in 10.2.0.3:

class testcon{

    public static void main(String args[]) throws SQLException {
        OracleDataSource ods = new OracleDataSource();
        String url = "jdbc:oracle:oci:@<YOUR_SID>";
        ods.setURL(url);
        ods.setUser("");
        ods.setPassword("");

.
.
.}

Using the DriverManager it can look like this:

.
.
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn=DriverManager.getConnection("jdbc:oracle:oci:/@<YOUR_SID>");
.
.

Regards

Pete

Other related posts: