Created 09-08-2017 03:34 AM
Geerally when we use --connect option in sqoop we use "jdbc:oracle:thin:@hostname:port/DB_SERVICE_NAME".
But can we user DB_SID instead of DB_SERVICE_NAME in connect option? If yes what will be the syntax for that.
Created 09-08-2017 04:36 AM
According to the JDBC Driver implementation it can take SID as well like, If the database to which you want to connect resides on host prodHost, at port 1521, and system identifier (SID) ORCL, and you want to connect with user name scott and password tiger, then use either of the two following connection strings:
Using host:port:sid syntax: String connString="jdbc:oracle:thin:@prodHost:1521:ORCL";
NOTICE: After Port there is a Colon (:) and then SID.
https://docs.oracle.com/cd/B28359_01/java.111/b31224/jdbcthin.htm
Are you getting any error while using SID in the same URL ?
Created 09-08-2017 04:36 AM
According to the JDBC Driver implementation it can take SID as well like, If the database to which you want to connect resides on host prodHost, at port 1521, and system identifier (SID) ORCL, and you want to connect with user name scott and password tiger, then use either of the two following connection strings:
Using host:port:sid syntax: String connString="jdbc:oracle:thin:@prodHost:1521:ORCL";
NOTICE: After Port there is a Colon (:) and then SID.
https://docs.oracle.com/cd/B28359_01/java.111/b31224/jdbcthin.htm
Are you getting any error while using SID in the same URL ?
Created 09-08-2017 09:10 AM
Created 09-08-2017 09:03 AM
Hi @Jay SenSharma, Thanks very much for the information. "String connString="jdbc:oracle:thin:@prodHost:1521:ORCL" this worked fine.