Oracle database discovery

  • Release version: Zurich
  • Updated June 7, 2026
  • 8 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Oracle database discovery

    Oracle database discovery in ServiceNow enables automated identification of Oracle database instances running on UNIX or Windows operating systems, including Oracle clusterware for Real Application Clusters (RAC). This discovery uses patterns, which replace multiple traditional probes for new instances. Customers can opt to deactivate the Horizontal discovery probe to continue using probes instead of patterns.

    Show full answer Show less

    Oracle DB discovery does not support RAC single-node discovery on UNIX or Windows. It also discovers Oracle catalog objects through a specific pattern extension. Customers should refer to Oracle Catalog discovery for more details on catalog data.

    Credentials and Permissions

    Discovery requires several credential types with appropriate permissions:

    • Applicative credentials: Mandatory for executing SQL queries and creating database link connections. The database user must have access to the tnsnames.ora file and permissions to run SQLPlus and SELECT queries on key Oracle tables.
    • Oracle Wallet authentication: Supported on UNIX as an alternative to applicative credentials.
    • Windows credentials: Required for Windows targets, with read access to tnsnames.ora and elevated rights for certain discovery commands.
    • SSH credentials: Required for UNIX targets, with read permissions to Oracle configuration files and elevated rights for discovery commands.

    Discovery Process and Requirements

    • Oracle instances on UNIX are identified by the running process starting with orapmon.
    • Oracle instances on Windows are detected via the oracle.exe process.
    • Oracle clusterware discovery requires permissions to read the /etc/hosts/ file and to execute various Oracle Grid Infrastructure commands, often needing sudo privileges.

    Classifiers, Patterns, and Probes

    Discovery uses classifiers, probes, and patterns specifically designed for Oracle instances and clusterware:

    • The Horizontal discovery probe launches the Oracle DB patterns for Windows and UNIX.
    • Application patterns include Oracle DB on Windows, Oracle DB on UNIX, and UNIX Cluster - ORACLE Clusterware (triggered by the crsd.bin process).
    • Oracle Listener discovery uses a dedicated SSH command probe without a pattern.

    To use patterns effectively, customers must ensure the Horizontal Pattern probe is properly configured on the classifier.

    Data Collected

    Discovery collects comprehensive details on Oracle instances, including SID, installation directory, version, parameter files, Oracle home, edition, host name, and TCP port information. The specific file locations explored for parameter files differ between UNIX and Windows.

    For Oracle clusterware, discovery gathers cluster name, status, type, IP addresses, node states, resource statuses, and VIP configurations, mapping cluster relationships within the CMDB.

    Oracle Options and Extensions

    Using the Oracle option extension (requiring the Software Asset Management Professional for Oracle plugin), discovery can identify enabled Oracle options and usage statistics. This requires appropriate table privileges and the ability to execute Oracle scripts for version 11.2 or later.

    The Extend Oracle instance extension collects additional attributes such as container database status, unique names, replication status, and database name. This extension is included in the Discovery and Service Mapping Patterns application version 1.0.72 or higher.

    Oracle Instances on Virtual Machines and Cloud

    When Oracle instances run on virtual machines, discovery creates relationships between the Oracle instance CI and the hosting computer or server CI, marking them as virtual. For instances hosted on AWS or Azure, discovery also maps relationships involving virtual machine instances and cloud datacenters.

    Clusterware CI Relationships

    Discovery maps detailed relationships for Oracle clusterware components, such as Unix Clusters, Cluster Nodes, Cluster Resources, and Cluster Virtual IPs. These relationships provide a clear view of cluster compositions and hosting infrastructure.

    Practical Guidance for ServiceNow Customers

    • Ensure discovery credentials are correctly configured with necessary permissions to read Oracle configuration files and execute SQL queries.
    • Confirm the Oracle processes (orapmon on UNIX, oracle.exe on Windows) are running within the discovery IP ranges.
    • Use the Horizontal discovery probe with Oracle DB patterns for efficient and modern discovery; deactivate probes only if necessary.
    • For Oracle clusterware discovery, verify sudo permissions and access to key Oracle Grid Infrastructure commands.
    • Install required plugins such as Software Asset Management Professional for Oracle and the Extend Oracle instance extension to enrich discovered data.
    • Understand how discovery models Oracle instances on virtual machines and cloud infrastructure to maintain accurate CI relationships.

    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:
    Credential type Additional information

    Applicative credentials

    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
    Oracle Wallet authentication You can use Oracle Wallet instead of applicative credentials (for UNIX only).
    Windows credentials 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.

    SSH credentials 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.

    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:
    Command Description

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

    Verifies if Oracle CRS process is running.

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

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

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

    Gets Oracle Grid home from the CRS daemon process path.

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

    Gets Oracle CRS cluster name.

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

    Gets Oracle CRS cluster ID.

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

    Gets Oracle CRS version.

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

    Gets Oracle CRS nodes.

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

    Gets Oracle CRS node status.

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

    Gets Oracle CRS resources.
    /u01/app/12.1.0.2/grid/bin/crsctl stat res -p | grep -v CHECK_R |grep -v error |grep -v failed Gets Oracle CRS VIP resources.

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

    Gets Oracle RAC SCAN VIP configurations.

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

    Gets Oracle CRS VIPs name.

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

    Get Oracle CRS VIPs ip_address.
    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:
    Classifier Trigger probes Pattern
    Oracle Instance
    • Horizontal discovery probe: launches patterns
    • Powershell-Oracle - Instance PFile (for Windows)*
    • Powershell-Oracle - Instance Version (for Windows)*
    • SSHCommand-Oracle - Instance Details (for Linux)*
    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.
    Oracle Listener SSHCommand-Oracle - Listener Details none
    *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 1. Data collected on UNIX machines
    Label Field name Additional information
    SID sid Obtained from the name of the process that starts with ora_pmon_
    Install directory install_directory Obtained from the path of ORA_HOME
    Version version 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
    Parameter file pfile 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/spfileSID.ora
    • oracle_home/dbs/spfile.ora
    • oracle_home/dbs/initSID.ora
    Oracle Home oracle_home Obtained from the ORATAB file.
    Edition edition Obtained from the context.xml file.
    Name name Combination of SID name Host name in the format SID@HOST_NAME.
    TCP port(s) tcp_port Obtained from the tnsnames.ora file, or lsnrctl status command. If no valid information is retrieved, the default port 1521 is assigned.
    Note:
    See Oracle options for pattern extensions and additional information collected.
    Table 2. Data collected on Windows machines
    Label Field name Additional information
    SID sid Obtained from the process parameter that is passed to the oracle.exe process.
    Install directory install_directory
    Version version Obtained from the output of the ORA_HOME/bin/sqlplus.exe -V command.
    Parameter file pfile 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\spfileSID.ora
    • oracle_home\database\spfile.ora
    • oracle_home\database\initSID.ora
    Oracle Home oracle_home Parsed from the path of oracle.exe
    Edition edition
    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.

    Table 3. Oracle Options [samp_oracle_options]
    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 privileges needed Additional information
    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
    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
    Table 4. Data collected on clusterware
    Table Labels and field names
    Unix Cluster [cmdb_ci_unix_cluster]

    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]

    cmdb_ci_unix_cluster_node

    Name [name]

    Node state [node_state]

    IP address [ip_address]

    Node status [node_status]

    cmdb_ci_unix_cluster_resource

    Name [name]

    Resource type [resource_type]

    Resource status [resource_status]

    Properties [properties]

    cmdb_ci_cluster_vip

    Name [name]

    IP address [ip_address]

    Cluster name [cluster_name]

    Cluster ID [cluster_id]

    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 privileges needed Additional information
    The following tables are accessed as part of the Extend Oracle Instance extension for UNIX and Windows:
    • V$DATABASE
    • V$INSTANCE
    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.

    Oracle instances on virtual machines

    When Oracle instances are hosted on virtual machines, the system creates relationships between CIs.
    CI Relationship CI
    Oracle instance Hosted on Computer [cmdb_ci_computer] or Server [cmdb_ci_server]
    Note:
    This is a virtual machine. The Is virtual field is true.
    Computer [cmdb_ci_computer] or Server [cmdb_ci_server]
    Note:
    This is a virtual machine. The Is virtual field is true.
    Virtualized by Computer [cmdb_ci_computer] or Server [cmdb_ci_server]
    Note:
    This is not a virtual machine.

    Oracle instances on virtual machines that are hosted on AWS or Azure clouds

    Base class Relationship Dependent class
    Oracle instance Hosted on Computer [cmdb_ci_computer]
    Note:
    This is a virtual machine. The Is virtual field is true.
    Computer [cmdb_ci_computer]
    Note:
    This is a virtual machine. The Is virtual field is true.
    Virtualized by Computer [cmdb_ci_computer]
    Note:
    This is not a virtual machine.
    Computer [cmdb_ci_computer]
    Note:
    This is a virtual machine. The Is virtual field is true.
    Virtualized by Virtual Machine Instance [cmdb_ci_vm_instance]
    Note:
    The vCPU count is populated in this table.
    Virtual Machine Instance [cmdb_ci_vm_instance] Hosted on AWS Datacenter [cmdb_ci_aws_datacenter] or Azure Datacenter [cmdb_ci_azure_datacenter]

    Relationships for clusterware

    CI Relationship CI
    Unix Cluster [cmdb_ci_unix_cluster] Virtualizes::Virtualized by Cluster Virtual IP [cmdb_ci_cluster_vip]
    Unix Cluster Resource [cmdb_ci_unix_cluster_resource] Defines resources for::Gets resources from Unix Cluster Node [cmdb_ci_unix_cluster_node]
    Cluster Virtual IP [cmdb_ci_cluster_vip] Uses::Used by Unix Cluster Node [cmdb_ci_unix_cluster_node]
    Unix Cluster Node [cmdb_ci_unix_cluster_node] Cluster of::Cluster Unix Cluster [cmdb_ci_unix_cluster]
    Unix Cluster Node [cmdb_ci_unix_cluster_node] Hosted on:Hosts Unix Cluster [cmdb_ci_unix_cluster]
    Unix Cluster Resource [cmdb_ci_unix_cluster_resource] Defines resources for::Gets resources from Unix Cluster [cmdb_ci_unix_cluster]

    Unix Cluster [cmdb_ci_unix_cluster]

    Hosts::Hosted on Linux Server [cmdb_ci_linux_server]
    Unix Cluster Node [cmdb_ci_unix_cluster_node] Hosted on::Hosts Linux Server [cmdb_ci_linux_server]