This discussion is archived
1 Reply Latest reply: Feb 11, 2013 1:01 AM by Mihael RSS

Connect to local database with OS authentication

975281 Newbie
Currently Being Moderated
I have set my database up so that it doesn't require any listeners, and so I can log in with it with my Windows username. I have tested this with SQL Developer, and have had no problem getting access to it, nor adding or editing data.

But now I need to connect to the database the same way from Java, and I don't know how to set up the connection string for that. I have tried various combinations of jdbc:oracle:thin:domain\user@localhost/database, leaving different parts out. In SQL developer, the connection string is just @ so I tried with that too, but none of this worked. Since the database is a local one, and I haven't set up a TCP listener for it, it also seems strange that I should have to use localhost.

Anyway, I am hoping someone can tell me what connection string I must use to connect to a local database using OS authentication from Java.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points