In the Spotlight April 2012
In TKU April 2012 Oracle-Database pattern has been updated to represent "Oracle Database Server" architecture more accurately.
By default each Oracle Instance has at least one "Oracle Net Services (TNS) Listener" which manages and distributes connections from Oracle client programs to specific Oracle Instance. But in advanced Oracle configurations (in clusters, HA systems etc) it is possible to have many-to-many relations between Oracle Database Servers and TNS Listeners:
- one Listener could serve a lot of Oracle Instances
- one Oracle Instance could be served by a lot of Listeners

The following important changes were made to improve the discovery of these more complex examples of Oracle architecture:
- The method for obtaining port was replaced by method for obtaining listen tcp sockets:
- Listener SI obtains the list of all tcp sockets (attr:'listen_tcp_sockets') and the list of served Oracle Instances (attr:'served_oracle_instances'):
- from: command "lsnrctl status <LISTENER_NAME>"
or - from: file 'listener.ora'
- from: command "lsnrctl status <LISTENER_NAME>"
Oracle SI populates information from 'listen_tcp_sockets' attribute of all Listener SIs which serve it.
Here is an example of the process of obtaining listening tcp sockets:

- Listener SI obtains the list of all tcp sockets (attr:'listen_tcp_sockets') and the list of served Oracle Instances (attr:'served_oracle_instances'):
- The method for obtaining Oracle 'service_name' and 'db_unique_name' was also updated. Updated pattern tries to read this information:
- from SPFILE - Oracle Server Parameter File.
or - from related Listener 'sid_to_service_map' attribute (if 'lsnrctl status' was used).
- from SPFILE - Oracle Server Parameter File.
- The method for running sql queries was also updated. New algorithm is:
- pattern sorts all collected listen_tcp_sockets in such order:
- IP based sockets, like 192.168.1.10:1521.
- Name based sockets, like host_alias:1521
- local sockets like '127.0.0.1:1521' and 'localhost:1521' are filtered out and not used
- then, pattern tries to run sql queries using each pair of tcp_socket and (SID or SERVICE_NAME) until some pair succeeds. For Name based sockets (where IP address could not be resolved) only 'port' information is used to run sql queries against the scanned host.
IP address and port combination of successful query is stored in 'success_login_cred' attribute for further usage by related patterns that perform SQL queries against Oracle Database Server.
- pattern sorts all collected listen_tcp_sockets in such order: