I'm trying to monitor three databases on a single Oracle server, each with a different SID (call them SID1, SID2, and SID3). I'm using the Oracle SQL v2 sensor. (Previously I had been monitoring all three databases with older sensor, but a recent Oracle upgrade broke those sensors.)
Two of the sensors, monitoring SID1 and SID2, work fine. The third one, monitoring SID3, fails with:
ORA-12505: TNS:listener does not currently know of SID given in connect descriptor
But this SID worked previously with the old sensor, before the upgrade. The tnsnames.ora file correctly lists the SID as SID3. So what could be wrong with this setup?
I'm running PRTG 15.1.15.2022+.
Article Comments
Thanks for the reply. I upgraded to 15.2.17.2804 and re-added the sensor, but unfortunately it still does the same thing:
ORA-12505: TNS:listener does not currently know of SID given in connect descriptor
Aug, 2015 - Permalink
Hello David,
Are the SID´s using the same Port and user account? Is there something different (Encryption, protocol, etc.) between the third SID and the others? Please verify that in the SID name a special character is used. Can you please reenter the System ID in the sensors settings again to avoid invisible characters?
Aug, 2015 - Permalink
Yes, some port and user account. As far as I can find, there's nothing different between the three SIDs, but something has got to be! There are no special characters in any of the SIDs. Outside of PRTG, I can log in with sqlplus and query any of the SIDs with the same user and password.
Here are two examples, both of which are accessible with sqlplus. Both examples show the correct SID and the correct username (which is the same for both). Both hostnames are CNAME records for the same database server:
1. $ sqlplus sns_q@prct.foo.com
SQL> select sys_context('userenv','instance_name') from dual;
SYS_CONTEXT('USERENV','INSTANCE_NAME')
--------------------------------------------------------------------------------
PRCT
SQL> select user from dual;
USER
------------------------------
SNS_Q
2. $ sqlplus sns_q@pprd.foo.com
SQL> select sys_context('userenv','instance_name') from dual;
SYS_CONTEXT('USERENV','INSTANCE_NAME')
--------------------------------------------------------------------------------
PPRD
SQL> select user from dual;
USER ------------------------------ SNS_Q
But in PRTG, I set up two identical Oracle SQL v2 BETA sensors, but only the first one works:
1. DNS Name: prct.foo.com
System ID: PRCT
SQL Query FIle: test.sql
Result: sensor OK
2. DNS Name: pprd.foo.com
System ID: PPRD
SQL Query File: test.sql
Result: ORA-12505: TNS:listener does not currently know of SID given in connect descriptor
I get the same results whether I set up the sensors on different devices (as I've shown here) or on the same device (which used to work). Both SIDs are actually on the same device.
Aug, 2015 - Permalink
Hello,
Please use the Utility tool TNSping (included with Oracle Client) and check if all three SID´s are connectable. (Run it on the PRTG Host (or host of the Remote Probe))
Use the following command to test connectivity tnsping <server>:<port>/<sid>
Which results do you get?
Aug, 2015 - Permalink
tnsping connects successfully to all three SIDs:
D:\>tnsping bandev:1521/pprd
TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 24-AUG-2 015 12:01:53
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Used parameter files: D:\sqlnet.ora
Used EZCONNECT adapter to resolve the alias Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=pprd))(ADDRESS=(P ROTOCOL=TCP)(HOST=xxx.xxx.xxx.xxx)(PORT=1521))) OK (30 msec)
Aug, 2015 - Permalink
Hello David,
in the tnsping result we can see that the service name was used and not the SID´s. Could you please forward us the results using the SID in the tnsping to support@paessler.com. Please refer to this article.
Aug, 2015 - Permalink
Hello David,
Please update to the latest version of PRTG and readd the Oracle v2 Sensors in order to see if the issue still remains, using the Auto-Update. Alternatively you can download the software from our Paessler Service Center using your registered email and password:
Once you have downloaded the latest version, you can install it directly over the version currently running. The configuration and database will not be affected by installing the newer version over the old and the configuration is automatically backed up before this process.
Aug, 2015 - Permalink