Username and Password in JDBC URL

I used SQuirrel SQL Client to connect and view my oracle database servers. I gave the credentials in the connection URL itself. But it still asks for a username and password. Do I need to provide an additional username / password when establishing a connection. Would it be from the connection url?

jdbc:oracle:thin:username/ password@my.oracle.server.domain.com :1521:DBName 
+4
source share
3 answers

Would it be from a URL connection?

I think not

You need to enter usrename and password.

Check out: h ttp: //squirrel-sql.sourceforge.net/user-manual/quick_start.html#howtoconnect

Connecting section

+2
source

Thin driver Oracle JDBC Thin driver uses Java sockets to connect directly to Oracle. It provides its own TCP / IP version of the Oracle SQL * Net protocol. Since it is 100% Java, this driver is platform independent and can also be run from a web browser (applets). There are 2 URL syntaxes, the old syntax that will only work with SID and the new one with the Oracle service name.

Old syntax

: oracle JDBC: thin: @ [HOST] [: port]: SID

New syntax

: oracle JDBC: thin: @ // [HOST] [: port] / SERVICE

The new SERVICE syntax could be the oracle service name or SID.

There are also some drivers that support URL syntax that allow you to specify the Oracle user ID and password in the URL.

: oracle JDBC: thin: [USER / PASSWORD] @ [HOST] [: port]: SID

: oracle JDBC: thin: [USER / PASSWORD] @ // [HOST] [: port] / SERVICE

source: http://www.orafaq.com/wiki/JDBC

+5
source

From what I have seen , support for passing username / password in the JDBC URL is not compatible with Oracle JDBC drivers.

+1
source

Source: https://habr.com/ru/post/1346657/


All Articles