Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

ksc_run_java throwing tns listener error when trying to run SQL

Highlighted
bzdafro
Collector

ksc_run_java throwing tns listener error when trying to run SQL

I use ksc_run_java  com.kintana.core.server.execution.KSCSQLQuery [AS.JDBC_URL] [AS.DB_USERNAME] "[AS.DB_PASSWORD]" "[QUERY_STRING]" etc to run select statements against PPM.   I am trying to run the same command but have it connect to our other PPM environments' DB.    I changed the commands to reference the other environment with the appropriate JDBC info,id and password.   However it throws the error below.    We are running on a windows server.  I can ssh to the server and issue tnsping, and it resolves to the DB I am trying to connect to.    Is this related to environment variables or the profile?   Any suggestions on how to troubleshoot this?   

 

ERROR: java.sql.SQLException: Could not connect to the JDBC URL: [jdbc:oracle:thin:@serverxyz.com:1522:dbname].
Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor

2 REPLIES
jsalass
Frequent Visitor

Re: ksc_run_java throwing tns listener error when trying to run SQL

Hi bzdafro,

 

The error is related with the connect descriptor received by the listener. It seems you specified a service name  that either has not yet dynamically registered with the listener or has not been statically configured for the listener.

To register the database with the listener

You have two options to register your database with the listener:

  1. Simply add a service name to your tnsnames.ora file.

  2. If you have the multiple listeners and have specified the database name in your pfile/spfile with local_listener=mysid then you can dynamically register the database with the listener.

3.  Use the Oracle Net configuration assistance in order to create a connection form your PPM server to the dabase server you need to connected.

 

Other examples:

 

http://edstevensdba.wordpress.com/2011/03/19/ora-12514/

 

Hope this helps!

 

Regards,

Jonathan

bzdafro
Collector

Re: ksc_run_java throwing tns listener error when trying to run SQL

we stopped using tnsnames.ora and have it using an LDAP query.   Would your instructions still apply?

//Add this to "OnDomLoad" event