Page 1 of 1

ORA-12504: TNS:listener was not given the SERVICE_NAME ??

Posted: Mon Sep 10, 2012 7:45 am
by xpertech
I download "Oracle Tablespace Wizard" and "Oracle Server Wizard" and refer document (http://assets.nagios.com/downloads/nagi ... lation.pdf), when using Nagios XI monitor Oracle Server, there was an error "ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA (DBD ERROR: OCIServerAttach)", what could be the problem?

I search google but still don't know what to do next?!

https://www.google.com/#hl=zh-TW&safe=o ... 40&bih=785

Re: ORA-12504: TNS:listener was not given the SERVICE_NAME ?

Posted: Mon Sep 10, 2012 10:21 am
by scottwilkerson
Did you add the LD_LIBRARY_PATH and ORACLE_HOME to your commands as outlined on page 2-3?

Re: ORA-12504: TNS:listener was not given the SERVICE_NAME ?

Posted: Mon Sep 10, 2012 9:54 pm
by xpertech
scottwilkerson wrote:Did you add the LD_LIBRARY_PATH and ORACLE_HOME to your commands as outlined on page 2-3?
Yes, we did.
We use that two wizard to test Oracle DB express version and it work fine, but when testing in our client's full version DB there was an error?!

Re: ORA-12504: TNS:listener was not given the SERVICE_NAME ?

Posted: Wed Sep 12, 2012 9:15 am
by scottwilkerson
Can you post the full command that the system is attempting to run

Re: ORA-12504: TNS:listener was not given the SERVICE_NAME ?

Posted: Wed Sep 12, 2012 10:43 am
by xpertech
scottwilkerson wrote:Can you post the full command that the system is attempting to run
Looks like this:
check_xi_oracletablespace!--connect "192.168.1.135:1521" --username system --password "password" --name SYSTEM --mode tablespace-can-allocate-next --warning 20 --critical 30

Some guys said need to edit "listener.ora" and "tnsnames.ora" in oracle server side, the others said need to edit NagiosXI side?!

We edit listener.ora and tnsnames.ora in oracle server side, and it did work, but if oracle server not allowed to edit, is there possible to edit NagiosXI command syntax?

Re: ORA-12504: TNS:listener was not given the SERVICE_NAME ?

Posted: Wed Sep 12, 2012 2:39 pm
by scottwilkerson
A little out of my expertise, but the connect string can be changed on the nagios side, If you look at the following post you can see what someone else is using after --connect=""

http://support.nagios.com/forum/viewtop ... 185#p24194

Re: ORA-12504: TNS:listener was not given the SERVICE_NAME ?

Posted: Tue Sep 18, 2012 11:47 am
by xpertech
scottwilkerson wrote:A little out of my expertise, but the connect string can be changed on the nagios side, If you look at the following post you can see what someone else is using after --connect=""

http://support.nagios.com/forum/viewtop ... 185#p24194
Hi Scott,
This works on our Oracle DB Server(testing lab), but still error when monitoring Oracle DB Server at our client's site.
We export client's Oracle DB Server VM and import to our VM lab for testing, no luck!

Is it possible that you or your team connect to our lab and take a look? that error need to be fix asap, thanks.

Re: ORA-12504: TNS:listener was not given the SERVICE_NAME ?

Posted: Tue Sep 18, 2012 3:10 pm
by nscott
Editing those files on the Oracle server is required as thats how the Oracle DB knows how to allow anybody to access them. Its somewhat akin to a firewall, or Access Control List. So yes, you'll have to edit those on the server.