jsn / ServiceNow, simplified.
AustraliaREFERENCE GUIDE

Oracle database discovery

On this page

Oracle database discovery

Discovery can identify an Oracle database instance that is running on UNIX or Windows operating systems. It can also find Oracle clusterware, which runs Real Application Clusters (RAC).

Patterns perform the discovery of Oracle installations. These patterns replace several probes for new instances. If you want to continue to use probes, you can deactivate the Horizontal discovery probe, which launches the pattern, and then activate the necessary probes.

Note: Oracle DB on Unix and Oracle DB on Windows do not support RAC single-node discovery.

The Oracle DB on Unix and Oracle DB on Windows patterns discover Oracle catalog objects through the pattern extension Get Catalog info. For more information, see Oracle Catalog discovery. For general information about database catalog discovery, see database catalogs.

Note: For information on Probe to Pattern migration see the knowledge article KB0694477.

Credentials

Configure these credentials:

<table id=“table_gmd_2kx_jz”><thead><tr><th>

Credential type

</th><th>

Additional information

</th></tr></thead><tbody><tr><td>

Applicative credentials

</td><td>

Applicative credentials are mandatory for two use cases:

  • Executing SQL queries against the remote Oracle DB Instance

  • Creating connections to database links

  • Software Asset Management activated

You must add the database user you configured during Oracle database installation. Specify Oracle instance [cmdb_ci_db_ora_instance] as the CI type. The user must also have access to the tnsnames.ora parameters file. Make sure that the tnsnames.ora is configured correctly and exists in the Oracle path on the target Windows host. Also, verify that the utilized Discovery Credentials can read tnsnames.ora file.

The user needs permissions for the SQL*Plus command line tool and permissions to execute SELECT queries against the following tables:

  • PRODUCT_COMPONENT_VERSION

  • V$VERSION

  • V$DATABASE

  • V$PARAMETER

</td></tr><tr><td>

Oracle Wallet authentication

</td><td>

You can use Oracle Wallet instead of applicative credentials.

</td></tr><tr><td>

Windows credentials

</td><td>

Required for Windows targets. The user must have read permissions to the tnsnames.ora file.For a list of privileged commands that you need for Discovery and Service Mapping, see Service Mapping commands requiring a privileged user. This list includes commands that require elevated rights to discover and map Unix-based hosts in your organization.

</td></tr><tr><td>

SSH credentials

</td><td>

Required for UNIX targets. The user must have read permission to the oratab file and read permission to the System Parameter file.For a list of privileged commands that you need for Discovery and Service Mapping, see Service Mapping commands requiring a privileged user. This list includes commands that require elevated rights to discover and map Unix-based hosts in your organization.

</td></tr></tbody> </table>## Additional requirements

Discovery identifies a running instance of an Oracle database on UNIX from the process that starts with ora_pmon_. Ensure this process is running in the IP range you designate for Discovery. Discovery identifies a running instance of an Oracle database on Windows from the oracle.exe process. Ensure this process is running in the IP range you designate.

For Oracle clusterware, you also need permissions to read the /etc/hosts/ file, which associates host names with IP addresses.

The following commands are run for Oracle clusterware:

<table id=“table_nfs_4tn_ndb”><thead><tr><th>

Command

</th><th>

Description

</th></tr></thead><tbody><tr><td>

ps -ef | grep 'crsd.bin' |grep -v grep

</td><td>

Verifies if Oracle CRS process is running.

</td></tr><tr><td>

ps -ef |grep LISTENER | grep -v $$ | head -1 | awk '{print $8}'

</td><td>

Gets Oracle home from the listener process path. Used when the ORACLE_HOME environment variable is unavailable.

</td></tr><tr><td>

ps -ef | grep 'd.bin' | grep -v grep | grep -v bash | awk '{print $8}'

</td><td>

Gets Oracle Grid home from the CRS daemon process path.

</td></tr><tr><td>

/u01/app/12.1.0.2/grid/bin/olsnodes -c | egrep -v 'error|return code'

</td><td>

Gets Oracle CRS cluster name.

</td></tr><tr><td>

sudo /u01/app/12.1.0.2/grid/bin/ocrcheck | egrep -v 'error|return code'

</td><td>

Gets Oracle CRS cluster ID.

</td></tr><tr><td>

/u01/app/12.1.0.2/grid/bin/crsctl query crs softwareversion| egrep -v 'error|return code'

</td><td>

Gets Oracle CRS version.

</td></tr><tr><td>

/u01/app/12.1.0.2/grid/bin/olsnodes | egrep -v 'error|return code'

</td><td>

Gets Oracle CRS nodes.

</td></tr><tr><td>

/u01/app/12.1.0.2/grid/bin/crsctl status server | egrep -v 'error|return code'

</td><td>

Gets Oracle CRS node status.

</td></tr><tr><td>

/u01/app/12.1.0.2/grid/bin/crsctl stat res -f | tr '\n' '#'

</td><td>

Gets Oracle CRS resources.

</td></tr><tr><td>

/u01/app/12.1.0.2/grid/bin/crsctl stat res -p | grep -v CHECK_R |grep -v error |grep -v failed

</td><td>

Gets Oracle CRS VIP resources.

</td></tr><tr><td>

/u01/app/12.1.0.2/grid/bin/srvctl config scan | tr '\n' ‘ '

</td><td>

Gets Oracle RAC SCAN VIP configurations.

</td></tr><tr><td>

/u01/app/12.1.0.2/grid/bin/srvctl config vip -node ol7-121-rac1| egrep ' Name' | awk '{print $3}'

</td><td>

Gets Oracle CRS VIPs name.

</td></tr><tr><td>

/u01/app/12.1.0.2/grid/bin/srvctl config vip -node ol7-121-rac1| grep ' IPv4 Address:' | awk '{print $4}'

</td><td>

Get Oracle CRS VIPs ip_address.

</td></tr></tbody> </table>Important: Sudo permission are required to run sudo /u01/app/12.1.0.2/grid/bin/ocrcheck | egrep -v 'error|return code'.

Classifiers, patterns, and probes

Discovery uses these classifiers, probes, and patterns for Oracle database discovery:

<table id=“table_fzd_2yv_jz”><thead><tr><th>

Classifier

</th><th>

Trigger probes

</th><th>

Pattern

</th></tr></thead><tbody><tr><td>

Oracle Instance

</td><td>

  • Horizontal discovery probe: launches patterns

  • Powershell-Oracle - Instance PFile (for Windows)*

  • Powershell-Oracle - Instance Version (for Windows)*

  • SSHCommand-Oracle - Instance Details (for Linux)*

</td><td>

Application patterns:

  • Oracle DB On Windows Pattern

  • Oracle DB on UNIX Pattern

This shared library pattern used by the Linux Server pattern:

UNIX Cluster - ORACLE Clusterware

Note: This shared library pattern is triggered if the crsd.bin process is running on the Oracle database server.

</td></tr><tr><td>

Oracle Listener

</td><td>

SSHCommand-Oracle - Listener Details

</td><td>

none

</td></tr></tbody> </table>*Probes inactive for new instances.

To use patterns, verify that the correct pattern is specified in the horizontal pattern probe on the classifier. See Add the Horizontal Pattern probe to a classifier for instructions.

Data collected

The following data is collected on the Oracle Instances [cmdb_ci_db_ora_instance] table for both UNIX and Windows:

<table id=“table_ewc_k1w_jz”><thead><tr><th>

Label

</th><th>

Field name

</th><th>

Additional information

</th></tr></thead><tbody><tr><td>

SID

</td><td>

sid

</td><td>

Obtained from the name of the process that starts with ora_pmon_

</td></tr><tr><td>

Install directory

</td><td>

install_directory

</td><td>

Obtained from the path of ORA_HOME

</td></tr><tr><td>

Version

</td><td>

version

</td><td>

Obtained in this order:- From the output of the ORA_HOME/bin/sqlplus /NOLOG command - From the output of the ORA_HOME/bin/lsnrctl status command - From the path of ORA_HOME

</td></tr><tr><td>

Parameter file

</td><td>

pfile

</td><td>

The following locations are explored for the location of the System Parameter File. If this file does not exist in one of the explored locations, Discovery does not find the file and reports an error. - oracle_home/dbs/spfile_SID_.ora - oracle_home/dbs/spfile.ora - oracle_home/dbs/init_SID_.ora

</td></tr><tr><td>

Oracle Home

</td><td>

oracle_home

</td><td>

Obtained from the ORATAB file.

</td></tr><tr><td>

Edition

</td><td>

edition

</td><td>

Obtained from the context.xml file.

</td></tr><tr><td>

Name

</td><td>

name

</td><td>

Combination of SID name Host name in the format SID@HOST_NAME.

</td></tr><tr><td>

TCP port(s)

</td><td>

tcp_port

</td><td>

Obtained from the tnsnames.ora file, or lsnrctl status command. If no valid information is retrieved, the default port 1521 is assigned.

</td></tr></tbody> </table>Note: See Oracle options for pattern extensions and additional information collected.

<table id=“table_tc2_qbw_jz”><thead><tr><th>

Label

</th><th>

Field name

</th><th>

Additional information

</th></tr></thead><tbody><tr><td>

SID

</td><td>

sid

</td><td>

Obtained from the process parameter that is passed to the oracle.exe process.

</td></tr><tr><td>

Install directory

</td><td>

install_directory

</td><td>

</td></tr><tr><td>

Version

</td><td>

version

</td><td>

Obtained from the output of the ORA_HOME/bin/sqlplus.exe -V command.

</td></tr><tr><td>

Parameter file

</td><td>

pfile

</td><td>

The following locations are explored for the location of the System Parameter File. If this file does not exist in one of the explored locations, Discovery does not find the file and reports an error. - oracle_home\database\spfile_SID_.ora - oracle_home\database\spfile.ora - oracle_home\database\init_SID_.ora

</td></tr><tr><td>

Oracle Home

</td><td>

oracle_home

</td><td>

Parsed from the path of oracle.exe

</td></tr><tr><td>

Edition

</td><td>

edition

</td><td>

</td></tr></tbody> </table>Note: See Oracle options for pattern extensions and additional information collected.

Oracle options

For general information on Oracle options, see https://docs.oracle.com/en/.

Discovery can also find the Oracle options that you enable on the instance using the legacy pattern extension, Oracle option extension for Windows/Unix. Note that to discover Oracle options, the Software Asset Management Professional for Oracle (com.snc.samp.oracle) plugin is required.

Label Field name Instance instance Option option Licensable licensable Currently used currently_used First usage date first_usage Last usage date last_usage Last sample date last_sample Detected usage detected_usage Sample interval sample_interval

<table id=“table_qb1_nn5_ymb”><thead><tr><th>

Table privileges needed

</th><th>

Additional information

</th></tr></thead><tbody><tr><td>

The following tables are accessed as part of the Oracle option extension for UNIX and Windows:- DBA_FEATURE_USAGE_STATISTICS - CDB_FEATURE_USAGE_STATISTICS - V$DATABASE - V$VERSION - GV$PARAMETER - V$CONTAINERS - V$INSTANCE

</td><td>

The following pattern extensions use the Oracle script: options_packs_usage_statistics.sql. This sql script is for DB Server version 11.2 and later. You need the Select any dictionary privilege to execute the script. See the support document ID13172651.1 on https://support.oracle.com/portal/ for more information about usage scripts. - Oracle option extensions for UNIX - Oracle option extensions for Windows

</td></tr></tbody> </table><table id=“table_rvs_gjl_mdb”><thead><tr><th>

Table

</th><th>

Labels and field names

</th></tr></thead><tbody><tr><td>

Unix Cluster [cmdb_ci_unix_cluster]

</td><td>

Name [name]

Cluster status [cluster_status]

Cluster type [cluster_type]

IP address [ip_address]

Short description [short_description]

Cluster ID [cluster_id]

Cluster version [cluster_version]

</td></tr><tr><td>

cmdb_ci_unix_cluster_node

</td><td>

Name [name]

Node state [node_state]

IP address [ip_address]

Node status [node_status]

</td></tr><tr><td>

cmdb_ci_unix_cluster_resource

</td><td>

Name [name]

Resource type [resource_type]

Resource status [resource_status]

Properties [properties]

</td></tr><tr><td>

cmdb_ci_cluster_vip

</td><td>

Name [name]

IP address [ip_address]

Cluster name [cluster_name]

Cluster ID [cluster_id]

</td></tr></tbody> </table>On the dependency view, a +1 on an Oracle database server signifies that it is part of a cluster.

Extend Oracle instance extension

Note: Discovery can also find additional attributes for the instance using the Extend Oracle instance extension. See the Oracle website for more information on options https://docs.oracle.com/en/. Discovery saves these attributes to the Oracle Instances [cmdb_ci_db_ora_instance] table.

Label Field name Instance instance Host Name host_name IS_CDB cdb_yn DB Unique Name db_unique_name DB Name database_name Replication Enabled replication_enabled

<table id=“table_hdn_tkn_pnb”><thead><tr><th>

Table privileges needed

</th><th>

Additional information

</th></tr></thead><tbody><tr><td>

The following tables are accessed as part of the Extend Oracle Instance extension for UNIX and Windows:- V$DATABASE - V$INSTANCE

</td><td>

The Extend Oracle Instance extension needs to be installed. This extension is included in the Discovery and Service Mapping Patterns application, version 1.0.72 or higher, which can be downloaded from the ServiceNow Store.

</td></tr></tbody> </table>## Oracle instances on virtual machines

When Oracle instances are hosted on virtual machines, the system creates relationships between CIs.

<table id=“table_eh4_pjv_xz”><thead><tr><th>

CI

</th><th>

Relationship

</th><th>

CI

</th></tr></thead><tbody><tr><td>

Oracle instance

</td><td>

Hosted on

</td><td>

Computer [cmdb_ci_computer] or Server [cmdb_ci_server]Note: This is a virtual machine. The Is virtual field is true.

</td></tr><tr><td>

Computer [cmdb_ci_computer] or Server [cmdb_ci_server]Note: This is a virtual machine. The Is virtual field is true.

</td><td>

Virtualized by

</td><td>

Computer [cmdb_ci_computer] or Server [cmdb_ci_server]Note: This is not a virtual machine.

</td></tr></tbody> </table>## Oracle instances on virtual machines that are hosted on AWS or Azure clouds

<table id=“table_ffp_vmv_xz”><thead><tr><th>

Base class

</th><th>

Relationship

</th><th>

Dependent class

</th></tr></thead><tbody><tr><td>

Oracle instance

</td><td>

Hosted on

</td><td>

Computer [cmdb_ci_computer]Note: This is a virtual machine. The Is virtual field is true.

</td></tr><tr><td>

Computer [cmdb_ci_computer]Note: This is a virtual machine. The Is virtual field is true.

</td><td>

Virtualized by

</td><td>

Computer [cmdb_ci_computer]Note: This is not a virtual machine.

</td></tr><tr><td>

Computer [cmdb_ci_computer]Note: This is a virtual machine. The Is virtual field is true.

</td><td>

Virtualized by

</td><td>

Virtual Machine Instance [cmdb_ci_vm_instance]Note: The vCPU count is populated in this table.

</td></tr><tr><td>

Virtual Machine Instance [cmdb_ci_vm_instance]

</td><td>

Hosted on

</td><td>

AWS Datacenter [cmdb_ci_aws_datacenter] or Azure Datacenter [cmdb_ci_azure_datacenter]

</td></tr></tbody> </table>## Relationships for clusterware

<table id=“table_bbb_zkg_ndb”><thead><tr><th>

CI

</th><th>

Relationship

</th><th>

CI

</th></tr></thead><tbody><tr><td>

Unix Cluster [cmdb_ci_unix_cluster]

</td><td>

Virtualizes::Virtualized by

</td><td>

Cluster Virtual IP [cmdb_ci_cluster_vip]

</td></tr><tr><td>

Unix Cluster Resource [cmdb_ci_unix_cluster_resource]

</td><td>

Defines resources for::Gets resources from

</td><td>

Unix Cluster Node [cmdb_ci_unix_cluster_node]

</td></tr><tr><td>

Cluster Virtual IP [cmdb_ci_cluster_vip]

</td><td>

Uses::Used by

</td><td>

Unix Cluster Node [cmdb_ci_unix_cluster_node]

</td></tr><tr><td>

Unix Cluster Node [cmdb_ci_unix_cluster_node]

</td><td>

Cluster of::Cluster

</td><td>

Unix Cluster [cmdb_ci_unix_cluster]

</td></tr><tr><td>

Unix Cluster Node [cmdb_ci_unix_cluster_node]

</td><td>

Hosted on:Hosts

</td><td>

Unix Cluster [cmdb_ci_unix_cluster]

</td></tr><tr><td>

Unix Cluster Resource [cmdb_ci_unix_cluster_resource]

</td><td>

Defines resources for::Gets resources from

</td><td>

Unix Cluster [cmdb_ci_unix_cluster]

</td></tr><tr><td>

Unix Cluster [cmdb_ci_unix_cluster]

</td><td>

Hosts::Hosted on

</td><td>

Linux Server [cmdb_ci_linux_server]

</td></tr><tr><td>

Unix Cluster Node [cmdb_ci_unix_cluster_node]

</td><td>

Hosted on::Hosts

</td><td>

Linux Server [cmdb_ci_linux_server]

</td></tr></tbody> </table>Parent Topic:Database discovery

Related topics

Add the Horizontal Pattern probe to a classifier

Horizontal Pattern probe

Database Administrator (DBA) report discovery

Oracle Catalog discovery

Oracle pluggable database and container database discovery

Oracle GLAS data collection using patterns

Keep exploring.

Find another answer, or bring this documentation into your own tools.