NetXMS Support Forum

English Support => General Support => Topic started by: mrocha on January 07, 2015, 05:32:45 PM

Title: Agent query to Oracle
Post by: mrocha on January 07, 2015, 05:32:45 PM
Hello,

I am trying to configure the agent to perform a query with DBQuery on an Oracle database.

I must connect to Oracle with TNS name, and it works fine with sqlplus, but the agent allways gives the error:

ORA-12154: TNS:could not resolve the connect identifier specified

I'm running NetXMS on ubuntu server with mysql database, but I need to run queries on an Oracle database.

I allready do it in another setup I have in windows, but through ODBC.

Best regards.

Can you please show me some way to do it?
Title: Re: Agent query to Oracle
Post by: Victor Kirhenshtein on January 07, 2015, 05:47:30 PM
Hi,

try to use connect string in form //server_address/SID instead of TNS name.

Best regards,
Victor
Title: Re: Agent query to Oracle
Post by: mrocha on January 07, 2015, 06:39:49 PM
Hi,

Thank you, it worked!

My only concern now is to be connected to only one server of a cluster. Any chance in the future to be able to connect by TNS name?

Again, thank you very much.
Title: Re: Agent query to Oracle
Post by: Victor Kirhenshtein on January 07, 2015, 07:11:26 PM
It should be able to use TNS names. Most likely it's client configuration or environment issue. Can you check what Oracle client is used by oracle.ddr?

Best regards,
Victor
Title: Re: Agent query to Oracle
Post by: mrocha on January 07, 2015, 08:36:31 PM
I'm using the Oracle Instant Client 12.1 x64. It's the only one installed.

The sqlplus connects fine with TNS.

Best regards,
Manuel