0

I am trying to connect to a schema on Oracle 11g on remote server via JDBC and I am getting following error while I am able to successfully connect through Oracle SQL Developer. I used the same JDBC code to connect many others schema which was always successful.

Jun 20, 2018 11:29:21 AM util.DBConnect getConnection
INFO: Driver loaded
Jun 20, 2018 11:29:24 AM util.DBConnect getConnection
SEVERE: java.sql.SQLRecoverableException: ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
wolφi
  • 8,091
  • 2
  • 35
  • 64
bihari_gamer
  • 422
  • 5
  • 15
  • Apparently your Oracle server is not started –  Jun 20 '18 at 06:55
  • I suspect you're confusing SID and service name, but without seeing exactly what you are using for both connections it's impossible to say what you are doing wrong. – Alex Poole Jun 20 '18 at 08:50
  • @Manish you need to provide us connection string (host, port, service_name) you are using to connect OR make sure that the mentioned parameters are correctly providing during your connection. – Ikrom Jun 20 '18 at 16:37
  • my_connection_name.oracle.url = jdbc:oracle:thin:@dummyHostName.quintiles.net:1521/XYZ01 my_connection_name.oracle.driver = oracle.jdbc.driver.OracleDriver my_connection_name.oracle.username = MY_USERNAME my_connection_name.oracle.password = somepassword – bihari_gamer Jun 21 '18 at 06:54
  • this is a dummy valued properties of connection – bihari_gamer Jun 21 '18 at 06:57
  • @a_horse_with_no_name my db is running and able to connect locally in server as well as remotely from Oracle Sql Developer tool. – bihari_gamer Jun 21 '18 at 07:08

1 Answers1

0

Adding fully qualified sid name (XYZ01.abc.companydomain.com) in the url worked for me like following.

my_connection_name.oracle.url = jdbc:oracle:thin:@dummyHostName.companydomain.net:1521/XYZ01.abc.companydomain.com
bihari_gamer
  • 422
  • 5
  • 15