Add Oracle Database Systems

An Oracle database system target is made up of components that constitute a logical database group. For example, it could be made up of a database and listener, or perhaps a database, listener, and ASM.

An Oracle database is typically dependent on other infrastructure entities such as a listener (for application connectivity) and ASM (for storage) in order for it to be available. Because these entities operate synergistically, Oracle Management Cloud allows you to add them as a single composite entity. This not only reduces the effort required to add them to Oracle Management Cloud, but also simplifies monitoring and managing them. Oracle Management Cloud accomplishes this via the Oracle database system entity type.

Single Instance Database System

When adding a database system for a single instance database, the following entities would be added:

  • Oracle Database

  • Pluggable Databases (if the DB is a Container)

  • Database Instances

  • Automatic Storage Management (ASM)

  • Net Listener

RAC Database System

When adding a database system for a RAC database or RAC database with storage on ASM, the following entities would automatically be added.

  • Oracle Database

  • Pluggable Database (if the DB is a Container)

  • SCAN Listener

  • Database Instances

  • ASM

  • Oracle Clusterware

Availability

Since a database system is a logical grouping of entities required to make a database available to the connecting applications, the availability of a database system is determined from the status of its member entities: The database system is UP if all the member entities are also UP.

Shared Entities

Database system entities such as ASM, CRS, and SCAN listeners are shared entities such that they can be shared resources between multiple database systems. For example, four RAC database systems can have the same Oracle Clusterware entity.

Prerequisites

Setting Up Monitoring Credentials for Database System Discovery

You need to ensure that all monitoring credentials are set up before preparing to discover an Oracle database system. As a composite entity, all prerequisites and credentials for related entities need to be defined before the database system can be successfully added.

Before you can begin monitoring DB systems, you must have the necessary privileges. A SQL script (grantPrivileges.sql) is available to automate granting these privileges. This script must be run as the Oracle DB SYS user. In addition to granting privileges, the grantPrivileges.sql script can also be used to create new or update existing monitoring users with the necessary privileges. For information about this SQL script, location and usage instructions, see Creating the Oracle Database monitoring credentials for Oracle Management Cloud (Doc ID 2401597.1).

To monitor Oracle databases in OMC (using Infrastructure Monitoring or IT Analytics), the cloud agent requires database monitoring credentials, i.e. a database user with the appropriate set of privileges to collect metrics.

You can use either:

  • The DBSNMP user (a user that is built-in with the Oracle Database)

    OR

  • You can create a new database user with appropriate privileges.

The DBSNMP user is provided as convenience since it is already predefined with all Oracle Databases. If you are using the DBSNMP user, it has sufficient privileges required for monitoring databases for Infrastructure Monitoring and IT Analytics. However, it also has additional privileges outside of what is required for Infrastructure Monitoring and IT Analytics.

Note:

To avoid the warning about a missing privilege on DBMS_LOCK, log in as sysdba and grant the following privilege to DBSNMP:
grant execute on sys.dbms_lock to DBSNMP

High Availability (Data Guard) and DBSNMP

Data Guard metrics are same as any other metric and can be collected using DBSNMP. But if the database is in MOUNTED state (eg. STANDBY database), not all metrics can be collected . Only Data Guard metrics can be collected and only by the SYSDBA monitoring user.

Review the following table for other prerequisites required for the other entity types.

Entity Type Prerequisite

Oracle Database

Oracle Database (To configure Oracle Database with TCPS)

Oracle Database Listener

Oracle Database Listener

Oracle Database Cluster Listener

Oracle Clusterware

Oracle Cluster Node

If the listener host is remote from the Cloud agent, you need to set up SSH connectivity between the agent host and listener host.

Note:

When setting up RAC systems, the following user privileges must be used:
  • Local Monitoring: The Agent user (OS user) should have privileges to run olsnodes and srvctl commands from GRID home.
  • Remote Monitoring: The SSH user in SSH credentials should have privileges to run olsnodes and srvctl commands.

For SSH connectivity, you need to set the following JSON properties based on your chosen authentication option:

Authentication Options

PasswordlessYou need to set up passwordless SSH connectivity between the agent host and listener host.

  • SSHUserName: The SSH user used to remotely log on to the listener host
  • sshdHost: The Cluster Host Name
  • sshdPort: The SSH port

Using a Password

  • SSHUserName: The SSH user used to remotely log on to the listener host
  • SSHUserPassword: The SSH host password. This parameter is optional passwordless SSH login is set up. When using passwordless SSH, you only need to provide a private key.
  • sshdHost: The Cluster Host Name
  • sshdPort: The SSH port

Using a Private Key

  • SSHUserName: The SSH user used to remotely log on to the listener host
  • sshdHost: The Cluster Host Name
  • sshdPort: The SSH port
  • SSH_PVT_KEY: Path of your private key file. Specifying the private key parameter is optional if the keys are generated at default location <user home>/.ssh

Oracle Automatic Storage Management (ASM)

Oracle Automatic Storage Management (ASM)

Adding a Database System

  1. Install the Cloud Agent on the Database Node.

    The key advantage to adding a database system is that the Oracle database and all related entities are discovered from a single agent. The host itself is automatically discovered when the Cloud agent is installed. For RAC environments, or any multi-host database environment, you need to deploy a Cloud agent on each host in order to receive host metrics. For instructions on how to install agents, see Install Cloud Agents.

  2. Add the Oracle Database System.

    Once your environment is set up, you are ready to add the Oracle database system entity. You can add a database system using the:

    • Oracle Management Cloud Console

      or

    • Command Line Interface (OMCLI) via JSON files

    Oracle Management Cloud Console

    1. From the Management Cloud console main menu, click Administration—>Discovery—>Add Entity. The Add Entity page displays.
      Add Database System from the Console

    2. Select the Configuration (Single Instance or RAC) and enter the requisite configuration and monitoring credentials. UI parameters vary depending on the selected configuration.

      Note:

      When setting up RAC systems, the following user privileges must be used:
      • Local Monitoring: The Agent user (OS user) should have privileges to run olsnodes and srvctl commands from GRID home.
      • Remote Monitoring: The SSH user in CRS credentials should have privileges to run olsnodes and srvctl commands.
      Oracle Database System (single instance) UI Property Fields
      • Entity Name: Your Oracle Database entity name. This name will also be used for the database system name
      • Configuration: Configuration for database system: Single Instance or RAC
      • Name Prefix: Name that will be used to de-duplicate, if needed, the auto-generated names for the Listener and Cluster (SCAN) Listener. Generated name will be hostname-of-listener_Listener Alias
      • Host Name:Name of the listener host that will be used to create the connect string to the database (host:port:SID or host:port:ServiceName)
      • Port: Listener port number used for connection requests
      • Connect Type: Type of connection: SID or Service Name
      • Connect Value: The value of the SID or Service Name
      • Listener Alias: Value of Listener Alias
      • Listener Oracle Home: Oracle Home directory of the Listener

        The Listener Oracle Home field in the UI is the Oracle Home of the listener configured for that database. The Oracle Home for the listener may or may not be the same Oracle Home as the database as illustrated by the following example.

        The following example shows two discrete database instances (prod_1 and test_1) in two separate Oracle Homes:

        Oracle Home 1: /u01/app/oracle/product/19.0.0/prod_1

        Oracle Home 2: /u01/app/oracle/product/19.0.0/test_1

        Because both instances are configured with the listener in Oracle Home 1, to discover the test_1 instance (in Oracle Home 2) you would enter /u01/app/oracle/product/19.0.0/prod_1 in the Listener Oracle Home field.

      • Cloud Agent: Cloud agent monitoring the database system.

      Monitoring Credentials

      • Username: Your Database User Name.
      • Password: Your Database Password.
      • Database Role: Your Database User Role (NORMAL/SYSDBA). Default is Normal.

      SI with ASM (ASM Credentials)

      • Username: Database user (ASM user name) that will be used by the cloud agent to connect to ASM.
      • Password: Your ASM Password
      • Role: Your ASM User role

      Cloud Agent is not on the Cluster Host (Host SSH Credentials)

      • SSH Username: Your SSH user used to remotely log on to the listener host.
      • SSH Password: Your SSH host Password.
      • SSH Private Key: Path of your private key file.
      • SSH Port: Your SSH port.
      Oracle Database System (RAC) UI Fields
      • Entity Name: Your Oracle Database Entity Name. Will also be used for the Database System name.
      • Name Prefix: Name that will be used to de-duplicate, if needed, the auto-generated names for the Listener and Cluster (SCAN) Listener. Generated name will be hostname-of-listener_Listener Alias
      • SCAN Name: Name of the SCAN Listener or SCAN VIP.
      • SCAN Port: Port number on which the SCAN listener is listening for connections.
      • Service Name: Service Name registered with the listener which is used to connect to the database.
      • Grid Home: Oracle home directory for the Oracle Grid Infrastructure.
      • Cloud Agent: Cloud agent used to monitor the cluster.

      Monitoring Credentials

      • Username: Your Database User Name.
      • Password: Your Database Password.
      • Database Role: Your Database User Role (NORMAL/SYSDBA). Default is Normal.

      RAC with ASM (ASM Credentials)

      • Username: Database user (ASM user name) that will be used by the cloud agent to connect to ASM.
      • Password: Your ASM Password
      • Role: Your ASM User role

      Cloud Agent is not on the Cluster Host (Host SSH Credentials)

      • SSH Username: Your SSH user used to remotely log on to the listener host.
      • SSH Password: Your SSH host Password.
      • SSH Private Key: Path of your private key file.
      • SSH Public Key: Path of your public key file.
      • SSH Host Name: Your Cluster Host Name.
      • SSH Port: Your SSH port.

    Command Line Interface (OMCLI) via JSON files

    1. Download and extract the required JSON file(s) from the master JSON zip file. See the table below for the specific JSON files you'll need.
    2. Edit the file(s) and specify the requisite properties for your chosen database system configuration.
      Oracle Database System (single instance) JSON Properties and Files

      Definition File: omc_oracle_db_system_SI.json

      • name: Your Oracle Database Entity Name. Will also be used for the Database System name
      • displayName: Your Oracle Database Entity Display Name. Will also be used for the Database System display name.
      • timezoneRegion: Your timezone
      • omc_dbsys_config: Configuration for DB System. Here, it is SI.
      • omc_dbsys_name_qualifier: Name that will be used to de-duplicate, if needed, the auto-generated names for the Listener and Cluster (SCAN) Listener. Generated name will be hostname-of-listener_Listener Alias
      • host_name:Name of the listener host that will be used to create the connect string to the database (host:port:SID or host:port:ServiceName)
      • omc_dbsys_port: Listener port number used for connection requests
      • omc_dbsys_connect_type: Specify type of connection: SID or Service Name
      • omc_dbsys_connect_value: The value of the SID or Service Name
      • omc_dbsys_lsnr_alias: Value of Listener Alias
      • omc_dbsys_home: Oracle Home directory of the Listener
      • capability: monitoring

      Credential File: omc_oracle_db_system_creds_SI_local.json

      • DBUserName : Your Database User Name
      • DBPassword : Your Database Password
      • DBRole : Your Database User Role. Default : Normal
      • If Remote:

      Credential File: omc_oracle_db_system_creds_SI_with_SSH.json

      • SSHUserName: Your SSH user used to remotely logon to the listener host
      • SSHUserPassword : Your SSH host Password
      • SSH_PVT_KEY: Path of your private key file. This private key is optional if the keys are generated at default location <user home>/.ssh
      • sshdPort: SSH port
      Oracle Database System (RAC) JSON Properties and Files

      Definition File: omc_oracle_db_system_RAC.json

      • name: Your Oracle Database Entity Name. Will also be used for the Database System name
      • displayName: Your Oracle Database Entity Display Name. Will also be used for the Database System display name.
      • timezoneRegion: Your timezone.
      • omc_dbsys_config: Configuration for DB System. Here, it is RAC.
      • omc_dbsys_name_qualifier: Name that will be used to de-duplicate, if needed, the auto-generated names for the Listener and Cluster (SCAN) Listener. Generated name will be hostname-of-listener_Listener Alias
      • omc_db_system_scan_name:Name of the SCAN Listener or SCAN VIP
      • omc_dbsys_port: Port number on which the SCAN listener is listening for connections
      • omc_dbsys_connect_type: Service Name
      • omc_dbsys_connect_value: Service Name registered with the listener which is used to connect to the database
      • omc_dbsys_home: Oracle home directory for the Oracle Grid Infrastructure
      • capability: monitoring

      Credential Files

      omc_oracle_db_system_creds_RAC_local_with_ASM.json

      omc_oracle_db_system_creds_RAC_with_SSH_with_ASM.json

      omc_oracle_db_system_creds_RAC_local_without_ASM.json

      omc_oracle_db_system_creds_RAC_with_SSH_without_ASM.json

      Credential properties:

      • DBUserName : Your Database User Name
      • DBPassword : Your Database Password
      • DBRole : Your Database User Role. Default : Normal

      If ASM is also to be discovered:

      • user_name: Your ASM User Name
      • password: Your ASM Password
      • role: Your ASM User role

      If Remote:

      • SSHUserName: Your SSH user used to remotely log onto the listener host
      • SSHUserPassword : Your SSH host Password. Optional , if there is a passwordless SSH setup. In this case, provide a private key field
      • SSH_PVT_KEY: Path of your private key file. This private key is optional if the keys are generated at default location <user home>/.ssh
      • sshdHost: Your Cluster Host Name
      • sshdPort: SSH port
    3. Add the entity using omcli.
      omcli add_entity agent DEFINITION_FILE [-credential_file CREDENTIAL_FILE [-encryption_method_gpg]] 
    4. Verify the status of the newly added entity.
      omcli status_entity agent DEFINITION_FILE

Deleting a Database System

When a database system is deleted, only the database system, the associated database and database's child entities (instances and pluggable databases) will be deleted. Other entities such as ASM, Clusterware and listeners will not be deleted.

Enabling Log Collection

Log collection via Log Analytics is available for specific types of database systems. To enable log collection, click the Associate Logs option. By default, the following logs are collected for the following entity types associated with the database system:

  • Oracle Database Instance:
    • Database Trace Logs
    • Database Alert Logs
    • Database Incident Dump Files
  • Oracle Database Clusterware
    • Clusterware Disk Monitor Logs
    • Clusterware Ready Services Alert Logs
    • Clusterware Ready Services Deamon Logs
  • Oracle Database Listener
    • Database Listener Alert Logs
    • Database Listener Trace Logs
  • Oracle ASM Instance
    • Automatic Storage Management Alert Logs
    • Automatic Storage Management Trace Logs

For more information about Log Anaytics, see About Oracle Log Analytics.