---
sourceDocument: Xanadu IT Operations Management
sourceDocumentLink: https://www.servicenow.com/docs/r/xanadu/it-operations-management

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu IT Operations Management

ft:clusterId :

    - itom

bundleId :

    - itom

workflow :

    - Technology


---

# Oracle database

# Oracle database discovery {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 7 minutes to read

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](https://www.servicenow.com/docs/yHrJhHUuFDO0Z42coQbDRA "The Discovery and Service Mapping Patterns application uses the Get Catalog info pattern extension of the Oracle DB on Unix and Oracle DB on Windows patterns to find Oracle Catalog objects. Discovering some of these resources may require updating to the latest version of the Discovery and Service Mapping Patterns application from the ServiceNow Store."). For general information about database catalog discovery, see [database catalogs](https://www.servicenow.com/docs/a4d5oZoigA829NPI~SRHWw "The database catalog lists all the catalog objects, or databases, discovered for an instance of a database.").  
Note:  
For information on Probe to Pattern migration see the knowledge article [KB0694477](https://support.servicenow.com/kb_view.do?sysparm_article=KB0694477).

## Credentials

Configure these credentials:{#c_OracleDatabaseDiscovery__table_gmd_2kx_jz__entry__2}

| Credential type | Additional information |
|-|-|
| [Applicative credentials](https://www.servicenow.com/docs/access?context=applicative-creds&version=xanadu&pubname=xanadu-platform-security&ft:locale=en-US) | 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 {#c_OracleDatabaseDiscovery__ul_zcm_lcy_3cc} |
| [Windows credentials](https://www.servicenow.com/docs/access?context=r_WindowsCredentialsForm&version=xanadu&pubname=xanadu-platform-security&ft:locale=en-US) | You can also use Windows and SSH credentials in addition to applicative credentials. For Windows credentials, the user must have read permissions to the `tnsnames.ora` file. SSH credentials, must allow 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](https://www.servicenow.com/docs/6_MAjf6UfeAcRtWL7ALp5g "Service Mapping uses commands requiring elevated rights to discover and map Unix-based hosts in your organization. In addition to configuring necessary credentials, configure servers in your organization to allow Service Mapping to run these commands with elevated rights."). This list includes commands that require elevated rights to discover and map Unix-based hosts in your organization. |
| [SSH credentials](https://www.servicenow.com/docs/access?context=r_SSHCredentialsForm&version=xanadu&pubname=xanadu-platform-security&ft:locale=en-US) | You can also use Windows and SSH credentials in addition to applicative credentials. For Windows credentials, the user must have read permissions to the `tnsnames.ora` file. SSH credentials, must allow 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](https://www.servicenow.com/docs/6_MAjf6UfeAcRtWL7ALp5g "Service Mapping uses commands requiring elevated rights to discover and map Unix-based hosts in your organization. In addition to configuring necessary credentials, configure servers in your organization to allow Service Mapping to run these commands with elevated rights."). This list includes commands that require elevated rights to discover and map Unix-based hosts in your organization. |
[ ]

{#c_OracleDatabaseDiscovery__table_gmd_2kx_jz}

## Additional requirements {#c_OracleDatabaseDiscovery__section_bpc_dtn_ndb}

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](https://docs.oracle.com/cd/E37670_01/E41138/html/ch11s02s01.html), which associates host names with IP addresses.  
The following commands are run for Oracle clusterware:{#c_OracleDatabaseDiscovery__table_nfs_4tn_ndb__entry__2}

| 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. |
| `/u01/app/12.1.0.2/grid/bin/olsnodes -c | egrep -v 'error|return code'` | Gets Oracle CRS cluster name. |
| `/u01/app/12.1.0.2/grid/bin/crsctl query crs softwareversion| 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. |
[ ]

{#c_OracleDatabaseDiscovery__table_nfs_4tn_ndb}Sudo permission 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:{#c_OracleDatabaseDiscovery__table_fzd_2yv_jz__entry__3}

| 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)\* {#c_OracleDatabaseDiscovery__ul_ixv_myv_jz} | Application patterns: * Oracle DB On Windows Pattern * Oracle DB on UNIX Pattern {#c_OracleDatabaseDiscovery__ul_skr_nyv_jz} This shared library pattern used by the [Linux Server](https://www.servicenow.com/docs/46l1Ofou~2mSaq6LwFv49g "Discovery and Service Mapping applications use probes and patterns to discover and map information about Linux computers and servers. The information is populated in the CMDB. Discovering some of these resources may require updating to the latest version of the Discovery and Service Mapping Patterns application from the ServiceNow Store.") 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 |
[ ]

{#c_OracleDatabaseDiscovery__table_fzd_2yv_jz} \*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](https://www.servicenow.com/docs/5RE9m008JOePVRIsGFvzXg#t_AddHorizontalPatternProbe "To use a pattern for the identification and exploration phases of horizontal discovery, you must add the Horizontal Pattern probe to the classifiers for the CIs are you trying to discover.") for instructions.

## Data collected

The following data is collected on the Oracle Instances \[cmdb_ci_db_ora_instance\] table for both UNIX and Windows:{#c_OracleDatabaseDiscovery__table_ewc_k1w_jz__entry__3}

| 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 {#c_OracleDatabaseDiscovery__ul_ndr_x1w_jz} |
| 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. * <var class="keyword varname">oracle_home</var>/dbs/spfile<var class="keyword varname">SID</var>.ora * <var class="keyword varname">oracle_home</var>/dbs/spfile.ora * <var class="keyword varname">oracle_home</var>/dbs/init<var class="keyword varname">SID</var>.ora {#c_OracleDatabaseDiscovery__ul_qv3_hbw_jz} |
| Oracle Home | oracle_home | Obtained from the <var class="keyword varname">ORATAB</var> 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. |
[Table 1. Data collected on UNIX machines]

{#c_OracleDatabaseDiscovery__table_ewc_k1w_jz}  
Note:  
See [Oracle options](https://www.servicenow.com/docs/tn5mYTyC~J~7DQv8yN_N0w#c_OracleDatabaseDiscovery__section_lvy_czw_xz) for pattern extensions and additional information collected.  
{#c_OracleDatabaseDiscovery__table_tc2_qbw_jz__entry__3}

| 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. * <var class="keyword varname">oracle_home</var>\\database\\spfile<var class="keyword varname">SID</var>.ora * <var class="keyword varname">oracle_home</var>\\database\\spfile.ora * <var class="keyword varname">oracle_home</var>\\database\\init<var class="keyword varname">SID</var>.ora {#c_OracleDatabaseDiscovery__ul_lzn_tbw_jz} |
| Oracle Home | oracle_home | Parsed from the path of oracle.exe |
| Edition | edition |   |
[Table 2. Data collected on Windows machines]

{#c_OracleDatabaseDiscovery__table_tc2_qbw_jz}  
Note:  
See [Oracle options](https://www.servicenow.com/docs/tn5mYTyC~J~7DQv8yN_N0w#c_OracleDatabaseDiscovery__section_lvy_czw_xz) for pattern extensions and additional information collected.

## Oracle options {#c_OracleDatabaseDiscovery__section_lvy_czw_xz}

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.  
{#c_OracleDatabaseDiscovery__table_ekt_gzw_xz__entry__2}

| 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 3. Oracle Options \[samp_oracle_options\]]

{#c_OracleDatabaseDiscovery__table_ekt_gzw_xz}  
{#c_OracleDatabaseDiscovery__table_qb1_nn5_ymb__entry__2}

| 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 {#c_OracleDatabaseDiscovery__ul_jxq_rn5_ymb} | 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 {#c_OracleDatabaseDiscovery__ul_cmj_5n5_ymb} |
[ ]

{#c_OracleDatabaseDiscovery__table_qb1_nn5_ymb}  
{#c_OracleDatabaseDiscovery__table_rvs_gjl_mdb__entry__2}

| 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\] |
[Table 4. Data collected on clusterware]

{#c_OracleDatabaseDiscovery__table_rvs_gjl_mdb}

On the dependency view, a +1 on an Oracle database server signifies that it is part of a cluster.

## Extend Oracle instance extension {#c_OracleDatabaseDiscovery__section_otr_rkn_pnb}

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.
{#c_OracleDatabaseDiscovery__table_gdn_tkn_pnb__entry__2}

| 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 |
[ ]

{#c_OracleDatabaseDiscovery__table_gdn_tkn_pnb} {#c_OracleDatabaseDiscovery__table_hdn_tkn_pnb__entry__2}

| 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 {#c_OracleDatabaseDiscovery__ul_idn_tkn_pnb} | 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. |
[ ]

{#c_OracleDatabaseDiscovery__table_hdn_tkn_pnb}

## Oracle instances on virtual machines {#c_OracleDatabaseDiscovery__section_qqy_43v_xz}

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

| 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. |
[ ]

{#c_OracleDatabaseDiscovery__table_eh4_pjv_xz}

## Oracle instances on virtual machines that are hosted on AWS or Azure clouds {#c_OracleDatabaseDiscovery__section_mfk_r3v_xz}

{#c_OracleDatabaseDiscovery__table_ffp_vmv_xz__entry__3}

| 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\] |
[ ]

{#c_OracleDatabaseDiscovery__table_ffp_vmv_xz}

## Relationships for clusterware {#c_OracleDatabaseDiscovery__section_jc5_1vn_ndb}

{#c_OracleDatabaseDiscovery__table_bbb_zkg_ndb__entry__3}

| 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\] |
[ ]

{#c_OracleDatabaseDiscovery__table_bbb_zkg_ndb}
**Related concepts**   

* [Database Administrator (DBA) report discovery](https://www.servicenow.com/docs/QLxk3gUrenvN_Q0wi1QXeA "Discovery and Service Mapping uses the Patterns extension sections to provide a Database Administrator report (DBA report) for the Apache Cassandra, Microsoft SQL, MySQL, MongoDB, and Oracle databases. The extension sections for each DB pattern populate the related entries tables. Discovering some of these resources may require updating to the latest version of the Discovery and Service Mapping Patterns application from the ServiceNow Store.")  
**Related tasks**   

* [Add the Horizontal Pattern probe to a classifier](https://www.servicenow.com/docs/5RE9m008JOePVRIsGFvzXg#t_AddHorizontalPatternProbe "To use a pattern for the identification and exploration phases of horizontal discovery, you must add the Horizontal Pattern probe to the classifiers for the CIs are you trying to discover.")  
**Related reference**   

* [Horizontal Pattern probe](https://www.servicenow.com/docs/7cl8B1L_yo678c6PMIg0qA "Discovery uses the Horizontal Pattern probe to launch patterns for horizontal discovery.")

