Page 1 of 1

SQL query issue

Posted: Tue Jan 08, 2019 10:04 am
by keerthi.seetharaman
Hello Team,

We got a new request to configure a parameter for which we have a SQL query. When we tried to execute we are getting an error as "OUTPUT: CRITICAL - cannot connect to P1CLARO. ORA-03134: Connections to this server version are no longer supported. (DBD ERROR: OCISessionBegin) ".

Please suggest what can be done.


Regards,
Keerthi Prashanth S

Re: SQL query issue

Posted: Tue Jan 08, 2019 3:42 pm
by npolovenko
@keerthi.seetharaman, What kind of plugin/wizard are you using for this query? Can you sanitize the query from any sensitive information and show to us in the thread? What version of the database are you running this query against?

Re: SQL query issue

Posted: Mon Jan 28, 2019 7:50 am
by keerthi.seetharaman
Hello Team,

This is the command that we are using.

COMMAND: /usr/local/nagios/libexec/check_oracle_health --environment ORACLE_HOME=/usr/lib/oracle/11.2/client64 --environment LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib --connect P1CLARO --mode sql --username abc --password xyz --name 'select%20count%28%2A%29%20from%20table_x_pr_lookup_s%20where%20x_pr_status%20in%20%280%2C9%29%20and%20x_create_date%20%3E%20sysdate%20-%202%20and%20x_create_date%20%3C%20sysdate%20-6%2F24%20and%20x_processed_date%20IS%20NULL' --warning 1 --critical 6
OUTPUT: CRITICAL - cannot connect to P1CLARO. ORA-03134: Connections to this server version are no longer supported. (DBD ERROR: OCISessionBegin)

Re: SQL query issue

Posted: Mon Jan 28, 2019 2:46 pm
by npolovenko
@keerthi.seetharaman, And what version of the Oracle database are you trying to run this query against? Perhaps the version of Oracle libraries you're using on your XI server are not compatible with the version of the Oracle DB?

Re: SQL query issue

Posted: Wed Feb 06, 2019 4:23 am
by keerthi.seetharaman
Hello Team,

Oracle version is as mentioned below:-

Oracle database version :- 8i - 8.1.7

Please do let us know in case if any modifications needs to be done from Nagios end.

Regards,
Keerthi Prashanth S.

Re: SQL query issue

Posted: Wed Feb 06, 2019 2:24 pm
by npolovenko
@keerthi.seetharaman This version of Oracle is very old and is likely no longer be supported. I suggest opening an issue on the authors GitHub page to confirm this:
https://github.com/lausser/check_oracle ... issues/new

Have you ran the following commands on the Oracle database to grant permissions to the Nagios user?
GRANT SELECT ON sys.dba_tablespaces TO nagios;
GRANT SELECT ON dba_temp_files TO nagios;
GRANT SELECT ON sys.v_$Temp_extent_pool TO nagios;
GRANT SELECT ON sys.v_$TEMP_SPACE_HEADER TO nagios;
GRANT SELECT ON sys.v_$session TO nagios;

Re: SQL query issue

Posted: Mon Feb 11, 2019 3:48 am
by keerthi.seetharaman
Thanks for your quick response.

We will provide an update on the permissions part.

Re: SQL query issue

Posted: Mon Feb 11, 2019 11:21 am
by npolovenko
@keerthi.seetharaman, Sounds good.