What is the JDBC url i need to give in the Database connector in order to query my external Oracle Db?

2
Hi everyone, I have been given some details in this format and need to connect to this DB: (values changed) Host/Server: uatdb1.xxxxxxxxxxxx.me-south-1.rds.amazonaws.com Port: 0000 DB Instance Name: ORCL User ID/Schema:  aaaaa Password: pppppp     TNS UATDB1=   (DESCRIPTION=     (ADDRESS=       (PROTOCOL=TCP)       (HOST=uatdb1.xxxxxxxxxxxx.me-south-1.rds.amazonaws.com)       (PORT=0000)     )     (CONNECT_DATA=       (SERVER=dedicated)       (SERVICE_NAME=ORCL)     )   )  I have the following menu   In the username and password areas i have given the appropriate inputs, but what do i enter in the jdbc url? Thanks in advance, Anirudh
asked
2 answers
0

JDBC uses the following format for connection URLs...

jdbc:driver://hostname:port/dbName
 

From your screenshot, it looks like you’ve missed the ‘//’ characters between the driver and hostname.

Hope this helps.

answered
4

For everyone who is coming over this question:

In oracle jdbc urls you have to differentiate between service or SID.

With SID the syntax should be as follows:

'jdbc:oracle:thin:@[IP]:[Port]:[SID]'

with service the snytax should be as follows:

'jdbc:oracle:thin:@//[IP]:[Port]/[Service Name]'

answered