6 Using the DBMCLI Utility

This chapter describes the Oracle Exadata Database Machine Command-Line Interface (DBMCLI) utility in Oracle Exadata Database Machine. DBMCLI provides many of the features that are provided with SQL*Plus, including the use of script files. This chapter contains the following topics:

6.1 Overview of the DBMCLI Utility

The DBMCLI utility is the command-line administration tool for configuring database servers, and managing objects in the server environment. DBMCLI runs on each server to enable you to configure an individual database server. You use DBMCLI to start and stop the server, to manage server configuration information, and to enable or disable servers. The command-line utility is already installed when Oracle Exadata Database Machine is shipped. This section contains the following topics:

6.1.1 Starting DBMCLI

You can start DBMCLI from the operating system command line on the database server that you want to manage or remotely from a network-attached client using Secure Shell (SSH). The command-line syntax is as follows:

dbmcli [port_number] [-n] [-m] [-xml] [-v | -vv | -vvv] [-x] [-e command]

The port_number in the preceding command specifies the HTTP port number of the database server. If the port_number argument is omitted, then the DBMCLI utility uses the value assigned to the HTTP_PORT variable in the cellinit.ora file on the database server. The file is located in the /opt/oracle/dbserver/dbms/deploy/config/ directory. If the HTTP_PORT variable in the cellinit.ora file is not set, then the port number defaults to 8888.

The following table lists the options that can be used with the DBMCLI command:

Option Description

-n

Runs the DBMCLI utility in non-interactive mode. This option suppresses the command prompt and disables the command-line editing features.

-m

Runs DBMCLI monitor (read-only) mode.

-xml

Causes output to be displayed in XML format for the Oracle Enterprise Manager.

-v, -vv, and -vvv

Sets the log level. The -v option is for fine, -vv is for finer, and -vvv is for the finest level.

-x

Suppresses the banner.

-e command

Runs the specified DBMCLI command. DBMCLI exits after running the command. For example:

$ dbmcli -e list dbserver detail
$ dbmcli -e "list dbserver attributes name where name   -
  like '.*dbm01'"

DBMCLI uses the database server operating system authentication. DBMCLI does not have a login parameter or a connect command. The directory from which DBMCLI is invoked is the default directory for unqualified file access in DBMCLI SPOOL and START commands.

See Also:

"DESCRIBE DBSERVER" for additional information about the offloadEfficiency attribute

6.1.2 Understanding Command Syntax and Options for DBMCLI

DBMCLI syntax is as follows:

{admin-command | object-command object} [options] ;

In the preceding syntax, the following arguments are used:

  • admin-command is an administrative action.

  • object-command is an action performed on an object.

  • object is an object or target on which a command performs an action.

  • options extend the use of a command combination to include additional parameters for the command.

When using the DBMCLI utility, the following rules apply:

  • Commands, objects, and options are not case-sensitive except where explicitly stated, such as in string patterns used in filtering strings with the LIKE operator.

  • Use single quotation marks or double quotation marks around the name of an object that includes spaces or punctuation. The use of quotation marks should match. For example, "this is incorrect' is incorrect because the first mark is double quotation marks, and the second is a single quotation mark.

  • The current, local database server is the database server to which all DBMCLI commands apply.

  • A semicolon (;) is optional at the end of a DBMCLI command.

  • A hyphen (-) is used at the end of a line to continue a long command onto the next line.

6.1.3 Reserved Words

The following are DBMCLI reserved words:

ALERTDEFINITION
ALERTHISTORY
ALL
ALTER
BMC
CONFIGUREBMC
CREATE
DESCRIBE
DETAIL
DROP
FORCE
LED
LIST
LUN
MAIL
MEMORY
METRICDEFINITION
METRICCURRENT
METRICHISTORY
MS
NULL
OFF
ON
PHYSICALDISK
RESTART
RS
SHUTDOWN
SNMP
STARTUP
THRESHOLD
VALIDATE

If these keywords are used as values in commands, then they must be enclosed in quotation marks.

6.1.4 DBMCLI Command-Line Editing

The DBMCLI utility supports command-line history and editing, similar to BSD editline and GNU readline functionality. Most of the command editing features of DBMCLI are similar to modern shells, such as bash and tcsh.

6.1.5 DBMCLI Input and Output Options

The database command-line utility reads commands from standard input and writes output to standard output. You can use the host operating system options for redirecting input and output to compose and process command scripts. For example, you can perform the following redirection:

$ dbmcli < command-script-in  > results-out

In the preceding example, the output from DBMCLI commands in the command-script-in file are written to the results-out file.

6.1.6 Comments in DBMCLI Scripts

You can add single-line comments to DBMCLI scripts using several formats. You can begin the comment line with REMARK,REM or -- (two hyphens).

For example, the following are valid syntax for comments:

REMARK This is a comment
REM This is a comment
-- This is a comment

6.1.7 Line Continuation in DBMCLI Commands

To continue a long command on to the next line, insert a hyphen (-) at the end of the line. Then, press Enter, and continue typing the command.

For example:

DBMCLI> LIST dbserver WHERE name LIKE '*.dbm04' -
        attributes name, status, comment

6.2 About DBMCLI Administration Commands

DBMCLI administrative commands do not act directly on objects.

DBMCLI uses the following administration commands:

Note:

The dbmadmin user should be used to run all services on the database server. The dbmmonitor user is for monitoring purposes. The dbmmonitor user can run the following commands:

  • DESCRIBE

  • EXIT

  • HELP

  • LIST

  • REMARK

  • SET

  • START

6.3 About DBMCLI Object Commands

DBMCLI has object commands, object types, and object attributes.

The following DBMCLI commands operate on Oracle Database objects:

Related Topics

6.4 About DBMCLI Object Types

Table 6-1 lists the Oracle Exadata Storage Server Software object types that can be used with DBMCLI object commands:

Table 6-1 Oracle Exadata Storage Server Software Object Types

Object Type Description

ALERTDEFINITION

An alert definition provides a definition for every alert that can be produced on the database server. Alerts are defined on metrics and other sources of alerts.

ALERTHISTORY

An alert history provides a list of alerts that have occurred on the database server.

DBSERVER

The current or local database server.

IBPORT

The InfiniBand ports for the database server.

LUN

Logical unit number (LUN) is the address for a RAID set of physical disk devices.

LUNs are automatically discovered when the server is started. They are assigned to the corresponding disk when the disk is first created or when disks are discovered after the system is restarted. LUNs that are not yet assigned to a disk have a NULL value.

METRICCURRENT

A current metric describes a set of observations on the current value of an individual metric.

METRICDEFINITION

A metric definition describes the configuration of a metric.

METRICHISTORY

A metric history describes a collection of past individual observations of all metric values.

PHYSICALDISK

A disk is called a physical disk on the server.

THRESHOLD

A threshold describes the rules for generating stateful alerts based on a specific metric. The rules include boundary (threshold) values and how long the metric values can violate these boundaries before an alert is generated.

Not all possible command-object combinations are valid. For valid command-object combinations, review the syntax for the specific object command.

6.5 DBMCLI Object Attributes

Each DBMCLI object has a set of attributes that are assigned when the object is created or altered. Attribute filters and lists are used to specify which attributes and objects are displayed in the output of the LIST command.

All attributes can be displayed, but only some can be modified directly by the user. To display a list of attributes and determine which ones can be modified, use the DESCRIBE command.

Related Topics

6.5.1 Restrictions on Values of Common Attributes

The following restrictions apply to the values of attributes common to multiple DBMCLI objects.

  • The value of the name attribute must be less than 256 characters and composed only of the following ASCII characters (alphanumeric and underscore only):

    • Lowercase alphabetic characters (a to z)

    • Uppercase alphabetic characters (A to Z)

    • Numbers (0 to 9)

    • Underscore (_)

  • The value of the comment attribute must be less than 256 characters.

See the syntax of each DBMCLI command for any additional restrictions on attribute values.

6.5.2 Attribute Lists in LIST Command

You can specify which attributes to display for the LIST command with the following optional clause:

ATTRIBUTES { ALL | attribute1 [, attribute2] ... }

ALL displays all possible object attributes for the LIST object combination.

6.5.3 Attribute Filters in LIST Commands

You can specify which objects to display with the LIST command using the following optional clause:

WHERE attribute-filter1 [AND attribute-filter2] ...

Each attribute-filterN has the following syntax:

attribute [ NOT | !] operator comparison_value

In the preceding syntax, the following arguments are used:

  • operator: The supported operators are listed in Table 6-2. These operators can be combined with NOT or !.

    Table 6-2 Supported Operators in Attribute Filters

    Operator Description

    =

    Tests for equality between string, status, or numeric attributes. For example:

    status NOT = normal
    

    >

    Tests for values greater than the numeric attributes. For example:

    size > 139920M
    

    <

    Tests for values less than the numeric attributes. For example:

    freeSpace !< 100M
    

    LIKE

    Tests for a regular expression match with a string attribute using case-sensitive matching. For example:

    LIKE 'GD_IO_RQ.*'
    
  • comparison_value: When used with the supported operators, comparison_value is one of the following value types:

    • Numeric

    • Literal: Value such as active or normal

    • Datetime: Time value supported only for ALERTHISTORY

    • String: Value delimited by single quotation marks ('') or double quotation marks (" ")

    • NULL: Unassigned strings or empty lists

6.6 Monitoring Database Server with Metrics

You can monitor a database server by viewing its metrics. Metrics are of the following type:

  • Cumulative: Statistics since the metric was created.

  • Instantaneous: Values at the time the metric is collected.

  • Rate: Computed value for metric by averaging statistics over a period of time.

This section contains the following topics:

6.6.1 About Metrics

Metrics are recorded observations of important run-time properties or internal instrumentation values of the data abase server and its components, such as CPU. Metrics are a series of measurements that are computed and retained in memory for an interval of time, and stored on a disk for a more permanent history.

Metric values typically record either the absolute value of a cumulative counter or a rate of change in a cumulative counter over an observed time period. Some metrics are used to record the time of state transitions as well.

Metric values can cause alerts to signal by comparing those values against threshold boundaries. Metrics can be associated with warning and critical thresholds when extreme values in the metric might indicate a problem or other event of interest to an administrator.

6.6.2 Displaying Metrics

You can use the DBMCLI LIST command to display and monitor metrics for database objects. You can display metric definitions, current metrics, and metric history using the LIST command.

Example 6-1 shows the LIST METRICHISTORY command with the name and metrictype attributes specified, and the output.

Example 6-1 Listing METRICHISTORY for Specific Attributes

LIST METRICHISTORY ATTRIBUTES name, metrictype
         DS_BBU_CHARGE           Instantaneous
         DS_BBU_TEMP             Instantaneous
         DS_CPUT                 Instantaneous
         DS_CPUT_MS              Instantaneous
         DS_FANS                 Instantaneous
         DS_FSUT                 Instantaneous
         DS_MEMUT                Instantaneous
         DS_MEMUT_MS             Instantaneous
         DS_RUNQ                 Instantaneous
         DS_SWAP_IN_BY_SEC       Instantaneous
         DS_SWAP_OUT_BY_SEC      Instantaneous
         DS_SWAP_USAGE           Instantaneous
         DS_TEMP                 Instantaneous
         DS_VIRTMEM_MS           Instantaneous
         N_HCA_MB_RCV_SEC        Rate
         N_HCA_MB_TRANS_SEC      Rate
         N_IB_MB_RCV_SEC         Rate
         N_IB_MB_TRANS_SEC       Rate
         N_IB_UTIL_RCV           Rate
         N_IB_UTIL_TRANS         Rate
         N_NIC_KB_RCV_SEC        Rate
         N_NIC_KB_TRANS_SEC      Rate
         N_NIC_NW                Instantaneous

6.6.2.1 Displaying Metric Definitions

Use the LIST METRICDEFINITION command to display the metric definitions for a database server.

A metric definition listing shows the configuration of a metric. Example 6-2 shows how to display attributes for the METRICDEFINITION object.

Example 6-2 Displaying Metric Definitions

DBMCLI> LIST METRICDEFINITION DS_CPUT DETAIL

DBMCLI> LIST METRICDEFINITION WHERE name LIKE 'DS_SWAP_*' -
         ATTRIBUTES name, metricType, description

6.6.2.2 Displaying Current Metrics

Use the LIST METRICCURRENT command to display the current metric values for a database server.

A current metric listing shows a set of observations on the current value of an individual metric. Example 6-3 shows how to display attributes for the METRICCURRENT object.

Example 6-3 Displaying Current Metric Values

DBMCLI> LIST METRICCURRENT DS_FANS DETAIL


DBMCLI> LIST METRICCURRENT WHERE objectType = 'DBSERVER' AND                 - 
         metricValue != 0 ATTRIBUTES name, metricObjectName,                  -
         metricValue, collectionTime

6.6.2.3 Displaying Metric History

Use the LIST METRICHISTORY command to display the metric history for a database server.

A metric history listing shows a collection of past individual observations of all metric values. Example 6-4 shows how to display attributes for the METRICHISTORY object.

The retention period for metric history files is specified by the metricHistoryDays attribute. You can modify this setting with the DBMCLI ALTER DBSERVER command.

Example 6-4 Displaying Metric History Values

DBMCLI> LIST METRICHISTORY DS_TEMP WHERE alertState='critical' DETAIL

DBMCLI> LIST METRICHISTORY WHERE objectType = 'DBSERVER' AND metricValue != 0   -
         AND collectionTime > '2014-08-12T09:10:51-07:00' -ATTRIBUTES name,      -
         metricObjectName, metricValue, collectionTime

6.6.3 Database Server Metrics

Database server metrics provide information about the server, such as CPU utilization, memory or network interconnections. To display database server metrics, use an object type attribute equal to DBSERVER with the METRICCURRENT, METRICDEFINITION, and METRICHISTORY objects. Example 6-5 shows how to display cell metrics.

Table 6-6 lists the metric names and descriptions for database server metrics. The database server for the metric is specified by the metricObjectName attribute of the METRICCURRENT and METRICHISTORY objects.

Table 6-3 Database Server Metrics and Descriptions

Metric Description

DS_BBU_CHARGE

Disk controller battery charge.

DS_BBU_TEMP

Temperature of disk controller battery.

DS_CPUT

The server CPU utilization which is the instantaneous percentage of time over the previous minute that the system CPUs were not idle (from /proc/stat).

DS_CPUT_MS

The percentage of CPU time used by MS.

DS_FANS

The instantaneous number of working fans on the server.

DS_FSUT

The percentage of total space utilized on the file system that is currently in use. This metric shows the space utilization in the various files systems on the server.

DS_MEMUT

The percentage of total physical memory used on the server.

DS_MEMUT_MS

The percentage of physical memory used by MS.

DS_RUNQ

The instantaneous average number (over the preceding minute) of processes in the Linux run queue marked running or uninterruptible (from /proc/loadavg).

DS_SWAP_IN_BY_SEC

The number of swap pages read in KB per second.

DS_SWAP_OUT_BY_SEC

The number of swap pages written in KB per second.

DS_SWAP_USAGE

The percentage of swap space used.

DS_TEMP

The instantaneous temperature (Celsius) of the server, provided by the Baseboard Management Controller (BMC).

DS_VIRTMEM_MS

The amount of virtual memory used by MS in megabytes.

N_HCA_MB_RCV_SEC

The number of megabytes received by the InfiniBand interfaces per second.

N_HCA_MB_TRANS_SEC

The number of megabytes transmitted by the InfiniBand interfaces per second.

N_IB_MB_RCV_SEC

The number of megabytes received by an InfiniBand port per second.

N_IB_MB_TRANS_SEC

The number of megabytes transmitted by an InfiniBand port per second.

N_IB_UTIL_RCV

The percentage of an InfiniBand port capacity utilized for receiving data.

N_IB_UTIL_TRANS

The percentage of an InfiniBand port capacity utilized for transmitting data.

N_NIC_KB_RCV_SEC

The number of kilobytes received by the Ethernet interfaces per second.

N_NIC_KB_TRANS_SEC

The number of kilobytes transmitted by the Ethernet interfaces per second.

Example 6-5 Displaying Database Server Metrics

CellCLI> LIST METRICCURRENT DS_CPUT DETAIL

         name:                   DS_CPUT
         alertState:             normal
         collectionTime:         2014-12-17T15:54:25-08:00
         metricObjectName:       abcd2x3
         metricType:             Instantaneous
         metricValue:            6.7 %
         objectType:             DBSERVER

6.7 DBMCLI Command Reference

DBMCLI has both administrative and object commands.

The following commands are available with the DBMCLI utility:

6.7.1 ALTER

Purpose

The ALTER command performs an action on or changes attributes of a single database server object or multiple objects. The ALTER command can be used to change an attribute or to take an action upon the object.

Syntax

ALTER { object_type object_name[, object_name]... operation
      | attribute_name = attribute_value 
        [, attribute_name = attribute_value]...
     }

Usage Notes

The following arguments can be used with the command:

  • object_type can be the following:

    • ALERTHISTORY

    • DBSERVER

    • IBPORT

    • THRESHOLD

    • USER

  • object_name is the name or identifier of an alert history, database server, LUN, or threshold.

  • operation is a valid action for the specified object_type.

When multiple objects are the target of an ALTER command, there is the possibility of partial success. If an error occurs, then the command is interrupted, and the remaining objects are not changed.

Related Topics

6.7.1.1 ALTER ALERTHISTORY

Purpose

The ALTER ALERTHISTORY command changes the attributes of all or specified alert histories.

Syntax

ALTER ALERTHISTORY { ALL | alertid1  [,alertid2 ...]}
       examinedBy=user_name

Usage Notes

The following arguments can be used with the command:

  • alertidn: The identifier of the alerts to be changed.

  • user_name: The name of the user who acknowledged the alert.

Examples

Example 6-6 shows the ALTER command used with the ALERTHISTORY object to update the examinedBy attribute. The examinedBy attribute is the only ALERTHISTORY attribute that can be modified.

Example 6-6 Altering ALERTHISTORY Attributes

DBMCLI> ALTER ALERTHISTORY 1671443714 -
                            examinedBy="jdoe"

DBMCLI> ALTER ALERTHISTORY ALL examinedBy="jdoe"

6.7.1.2 ALTER DBSERVER

The ALTER DBSERVER command changes the attributes of the database server.

Syntax

ALTER DBSERVER  {
  | SHUTDOWN SERVICES { RS | MS | ALL }
  | RESTART SERVICES { RS | MS | ALL }
  | RESTART BMC
  | STARTUP SERVICES { RS | MS | ALL }
  | LED { ON | OFF }
  | VALIDATE { MAIL | SNMP | CONFIGURATION }
  | VALIDATE SYSLOGCONF facility.priority
  | CONFIGUREBMC
  | attribute_name = attribute_value 
        [, attribute_name = attribute_value]...
  }

Usage Notes

The following table lists the arguments and options for the ALTER DBSERVER command:

Argument Options Description

SHUTDOWN SERVICES

MS (Management Server)

RS (Restart Server)

ALL

The MS service is shut down.

The RS service is shut down.

The ALL option shuts down the MS and RS services.

RESTART SERVICES

MS

RS

ALL

The MS service is shut down, and then started.

The RS service is shut down, and then started.

The ALL option shuts down, then starts up, the MS and RS services.

RESTART BMC

n/a

Restarts the Baseboard Management Controller (BMC).

STARTUP SERVICES

MS

RS

ALL

The MS service is started.

The RS service is started.

The ALL option starts up the MS and RS services.

LED

ON

OFF

LED ON and LED OFF operations turn on and off the chassis LED.

You can manually set the LED to light to indicate that a database server requires maintenance. The LED is also set to light automatically if a component fails.

VALIDATE

MAIL

SNMP

CONFIGURATION

The VALIDATE MAIL operation sends a test message using the e-mail attributes configured for the database server.

The VALIDATE SNMP operation sends a test message using the SNMP attributes configured for the database server. The VALIDATE SNMP TYPE=ASR operation validates ASR on Exadata Storage Server.

The VALIDATE CONFIGURATION operation validates the configuration.

VALIDATE SYSLOGCONF

facility.priority

The VALIDATE SYSLOGCONF facility.priority sends a test message for the specified facility and priority.

CONFIGUREBMC

n/a

Configures the BMC for hardware alerts to the local database server so that Management Server can pick up the alerts.

attributes

 

The attributes that can be changed using the ALTER DBSERVER command are shown as modifiable in Example 6-32.

The following are additional usage notes for the ALTER DBSERVER command:

  • It may be necessary to restart, shut down, or start up a database server for the following reasons:

    • Software upgrades

    • Service outages that include any condition under which a database server is not responding to service requests

  • To set up the database server to send notifications about alerts, you can configure the following database server attributes:

    • smtpServer

    • smtpPort

    • smtpUser

    • smtpPwd

    • smtpUseSSL

    • smtpFrom

    • smtpFromAddr

    • smtpToAddr

    • snmpSubscriber

    • snmpUser

    • snmpEngineID

    • notificationMethod

    • notificationPolicy

    • emailSubscriber

    The smtpToAddr attribute can be set to a list of comma-delimited e-mail addresses that are the recipients of the alert notification. The list must be enclosed in quotation marks.

    The snmpSubscriber attribute can be set to a list of SNMP targets to which the SNMP alert notification is sent. These targets are specified as follows:

    snmpSubscriber=(
      (host=host[,port=port][,community=community][,type=user_type][,fromIP="ip"][,asrmPort="ASRManager_port"])
    [,(host=host[,port=port][,community=community][,type=user_type][,fromIP="ip"][,asrmPort="ASRManager_port"])] ...)
    

    Note:

    • The ALTER DBSERVER ... smnpSubscriber command replaces the existing value set for smnpSubscriber. To add to the list of SNMP targets ensure that you include the existing values in the command. The following message is displayed after running the command:

      snmpSubscriber {0} has been replaced with {1}.
      
    • The snmpSubscriber attribute is used to configure Auto Service Request.

    • The SNMP alerts conform to MIBs (management information base) which are included with each installation of Oracle Exadata Storage Server Software. The MIB files on the database server are available at /opt/oracle/dbserver/dbms/deploy/config/.

      Type ASR and v3ASR alerts conform to SUN-HW-TRAP-MIB, which is available in the SUB-HW-TRAP-MIB.mib file.

      The other alert types conform to the cell_alert MIB, which is available in the cell_alert.mib file.

      The SNMP alerts and MIB conform to SNMP version 1 (SNMPv1). However, the Auto Service Request alerts conform to SNMP version 2c (SNMPv2c).

    The default value for port is 162. The default value for community is public.

    The notificationMethod attribute value can be mail, snmp, none, or a combination of mail and snmp, such as notificationMethod='mail,snmp'. The default value is mail.

    The snmpSubscriber types are ASR, v3, and v3ASR. For types v3 and v3ASR, a snmpUser must be defined, and the user name is provided instead of community.

    For the v3ASR type, the user must be defined with authProtocol=SHA, and privProtocol=AES. These are the only protocols supported by ASR Manager. Setting the snmpSubscriber as type v3ASR also sets the ILOM properties and rules for traps sent by ILOM.

    If type is not specified, the default is version 1, cell_alert traps. There is no string to specify this type. To use this type, just omit the type field.

    The fromIP field enables you to specify an IP address from which the trap is sent. If this field is not specified, it defaults to the IP address associated with eth0. Use this field if the default IP address is not registered with ASR Manager. ASR Manager only processes SNMP traps that are sent from IP addresses that it recognizes.

    The fromIP field is allowed only for snmpSubscribers whose type is either ASR or v3ASR.

    For example:

    DBMCLI> alter dbserver snmpSubscriber=((host=asrhost,port=162,community=public,fromIP="1.1.1.1",type=ASR))
    

    The following example returns an error because the type is not ASR or v3ASR.

    DBMCLI> alter dbserver snmpSubscriber=((host=localhost,port=162,community=public,fromIP="1.1.1.1"))
    DBM-00068: The fromIP field is only supported for ASR SNMP subscribers.
    

    The asrmPort field enables you to specify the port number on an ASR Manager machine that MS uses to communicate with ASR Manager. This port must be the same as the HTTP port of ASR Manager’s HTTP Receiver. You can check this by running “asr show_http_receiver” on the ASR Manager machine.

    The asrmPort field is allowed only for snmpSubscribers whose type is either ASR or v3ASR. The default value for this port is 16161.

    The snmpUser attribute defines the user who receives SNMP alerts. The syntax for the attribute is as follows:

    ((name=user1, authProtocol=auth_type, privProtocol=priv_type,),  \
    (name=user2, authProtocol=auth_type, privProtocol=priv_type,), ...) 
    
    • name is the user name.

    • authProtocol is the authentication protocol, options are MD5 or SHA.

    • privProtocol is encryption protocol, options are none, AES or DES. The default is none when the privProtocol attribute is not specified.

    • The authProtocol must be specified for the snmpUser attribute.

    • The system prompts for the authentication password. The authentication password must be a have 8 to 12 alphanumeric characters.

    • The system prompts for a encryption password if the encryption protocol is specified. The password is exactly 8 alphanumeric characters, and they are case sensitive.

    • Passwords are not stored or displayed. Secure hash keys are computed and used for trap authentication and encryption.

    The smtpUseSSL attribute enables Secure Socket Layer (SSL) encryption on the e-mail notifications when the attribute is set to true.

    The notificationPolicy attribute value can be none or a combination of critical, warning, or clear, such as notificationPolicy='warning,clear.'

    • The critical value refers to hardware-generated alerts or alerts generated by Automatic Diagnostic Repository (ADR) or BMC. The critical value also refers to a metric alert when the value exceeds the critical threshold specified in the metric definition.

    • The warning value refers to a metric alert when the value exceeds the warning threshold specified in the metric definition.

    • The clear value refers to a metric alert when the value is below the threshold boundary after having previously exceeded a warning or critical threshold.

    • The maintenance value refers to all hardware-related errors. The hardware errors are reported as "Maintenance" in e-mail message subject lines.

  • For each subscriber, the host must be specified as either a domain name or an IP address. Enclose the host name or IP address in quotation marks if it contains non-alphanumeric characters. Port and community values are optional. The default port value is 162. The default community value is public. The type value is optional. The default value for type is NULL. The types ASR, V3, and v3ASR are the only supported non-NULL value.

  • After startup of the Management Server (MS), the snmpSubscriber list entries with type ASR or v3ASR are added to the ILOM for the database server. This ensures that when an ILOM is replaced, the entries are set for the new ILOM. If the entries are removed from the ILOM, then they must be manually added to the ILOM using the ALTER DBSERVER ... snmpUser= command.

  • The snmpSubscriber with type=asr or type=v3ASR should only be configured to point to ASR Manager.

  • To validate that e-mail messages are successfully sent for database server alerts or events, use the ALTER command with the VALIDATE MAIL option. The validation process sends a test e-mail message to the configured recipient. If that test e-mail message is not received, then an e-mail configuration setting is not valid.

  • The emailFormat attribute can be html or text. By default, e-mail notifications are sent in HTML format. Change the value to text to receive plain text e-mail notifications.

  • The ALTER DBSERVER snmpEngineID command is used by the SNMP managers to subscribe to alerts from the database servers. The snmpEngineID parameter can be up to 20 characters. It should be unique for each target within a data center. The default is the database server name. This default is used if the snmpEngineID attribute is not set before the SNMP users are defined.

    The engine identifier should not be changed after SNMP users are defined. Any change to an engine identifier causes the user keys to be re-computed, and user passwords must be re-entered.

  • If the database server name is changed, then you must choose a unique database server name.

  • If an ipaddressN attribute is modified, then the network configuration file /etc/oracle/cell/network-config/cellinit.ora is modified.

  • The ALTER DBSERVER snmpSubscriber command configures the ASR subscriber, and sends traps.

  • The ALTER DBSERVER emailSubscriber command sets a list of comma-delimited e-mail addresses that are the recipients of alert notifications for specific alert types. The following is an example of the syntax:

    ALTER DBSERVER emailSubscriber = ((email="email_address1",                \ 
               alertType="alert_type")                               \
              [, (email="email_address2",alertType="alert_type"), ...])
    

    The e-mail address must be a valid e-mail address. The email parameter is mandatory. The alertType parameter specifies the type of alert, and is optional. The alert types are HARDWARE, SOFTWARE, METRIC or ADR. If the alert type is not specified, then the subscription is for all alert types.

    An empty input string removes the current set of subscribers.

    The notification policy must be set before alert notifications can be received. The policy applies to all e-mail subscribers. The notification policy for these alerts are the same as for snmpSubscriber alerts.

  • The syslogconf attribute extends syslog rules for a database server. The attribute can be used to designate that syslog messages be forwarded to a specified management server. On the management server, the forwarded messages are directed to a file, console, or management application, depending on the syslog configuration on the management server. The following shows the syntax for the attribute:

    syslogconf = ('selector @node' [, 'selector @node']... )
    

    In the preceding syntax, selector is the message type, and node is the specified server. Both variables follow syslog.conf standard syntax rules.

  • The facility option for the syslogconf attribute must be one of the following: auth, authpriv, cron, daemon, ftp, kern, lpr, mail, mark, news, security, syslog, user, uucp, local0, local1, local2, local3, local4, local5, local6, local7, none, and *.

  • The priority option for the syslogconf attribute must be one of the following: alert, crit, debug, emerg, err, error, info, notice, panic, warn, warning, none, and * (asterisk).

  • The ALTER DBSERVER VALIDATE syslogconf selector command sends a test log message. The test message is directed as specified by rules in the /etc/syslog.conf file. If the syslogconf assignment extends the syslog rules, then a test message is forwarded to the specified management servers.

  • You can turn off the diagnostic pack attachment to emails by running the following command:

    ALTER DBSERVER diagPackEmailAttach=FALSE
    

Examples

Example 6-7 shows how to set the asrmPort field for an snmpSubscriber.

Example 6-8 shows how to enable and disable the auto diagpack upload feature.

Example 6-9 shows how to set up e-mail notifications for the database server.

Example 6-10 shows how to validate the e-mail setup on a database server.

Example 6-11 shows how to change the format of e-mail messages.

Example 6-12 shows how to validate the SNMP setup on a database server.

Example 6-13 shows how to specify the type of e-mail alerts. In the example, one subscriber gets hardware and software alerts, and the other subscriber gets ADR alerts.

Example 6-14 shows how to start up and shut down database server services.

Example 6-15 shows how to set the LED on the database server.

Example 6-16 shows the pending core count for capacity-on-demand. The server must be restarted in order for the new core count to be active.

Example 6-17 shows how to increase the number of active cores to 20.

Example 6-18 shows how to add a rule using the syslogconf attribute.

Example 6-19 shows how to add and validate a rule with test message.

Example 6-20 shows how to remove the syslog.conf rule.

Example 6-7 Setting the asrmPort for an snmpSubscriber

DBMCLI> ALTER DBSERVER snmpSubscriber=((host=host1,port=162,community=public,type=asr,asrmPort=16161))

Example 6-8 Enabling/Disabling Auto Diagpack Upload

You can enable or disable this feature by setting the diagPackUploadEnabled attribute on the dbserver object.

Set the attribute to false to disable this feature, true to enable it. The default is true.

DBMCLI> ALTER DBSERVER diagPackUploadEnabled=FALSE

Example 6-9 Configuring E-Mail Notifications for a Database Server

DBMCLI> ALTER DBSERVER smtpServer='my_mail.example.com',            -
                    smtpFromAddr='john.doe@example.com',         -
                    smtpFrom='John Doe',                         -
                    smtpToAddr='jane.smith@example.com',         -
                    snmpSubscriber=((host=host1),(host=host2)),  -
                    notificationPolicy='clear',                  -
                    notificationMethod='mail,snmp'

Example 6-10 Validating E-mail on a Database Server

DBMCLI> ALTER DBSERVER VALIDATE MAIL

Example 6-11 Changing the Format of E-mail Messages

DBMCLI> ALTER DBSERVER emailFormat='text'
DBMCLI> ALTER DBSERVER emailFormat='html'

Example 6-12 Validating SNMP on a Database Server

DBMCLI> ALTER DBSERVER VALIDATE SNMP

Example 6-13 Specifying the Type of E-mail Alert

ALTER DBSERVER emailSubscriber=                                             \
           ((email="email1@example.com",alertType="HARDWARE,SOFTWARE"), \
           (email="email2@example.com",alertType="ADR"))

Example 6-14 Starting Up and Shutting Down Database Server Services

DBMCLI> ALTER DBSERVER SHUTDOWN SERVICES MS

DBMCLI> ALTER DBSERVER RESTART SERVICES MS

Example 6-15 Setting the Database Server LED Off and On

DBMCLI> ALTER DBSERVER LED OFF
DBMCLI> ALTER DBSERVER LED ON

Example 6-16 Setting Pending Core Count

DBMCLI> ALTER DBSERVER pendingCoreCount=20

Example 6-17 Increasing the Number of Active Cores

DBMCLI> ALTER DBSERVER pendingeCoreCount=20

Example 6-18 Using the syslogconf Attribute

DBMCLI> ALTER DBSERVER syslogconf=('*.err;authpriv.none @loghost', -
         '*.emerg @loghost')

Example 6-19 Adding and Validating a Rule

DBMCLI> ALTER DBSERVER syslogconf=('kern.crit @loghost')
DBMCLI> ALTER DBSERVER VALIDATE syslogconf   'kern.crit'

Example 6-20 Removing All syslog.conf Rules

DBMCLI> ALTER DBSERVER syslogconf=''

6.7.1.3 ALTER IBPORT

Purpose

The ALTER IBPORT command performs an action on all InfiniBand ports, or specified InfiniBand ports.

Syntax

ALTER IBPORT {ALL | ibport_name [, ibport_name] ...} RESET COUNTERS

Usage Notes

The RESET COUNTERS option resets all counters on the InfiniBand port.

Examples

Example 6-21 shows the ALTER command with the IBPORT object.

Example 6-21 Altering IBPORT Attributes

DBMCLI> ALTER IBPORT ALL RESET COUNTERS

         InfiniBand Port HCA-1:1 successfully altered.
         InfiniBand Port HCA-1:2 successfully altered.
 
DBMCLI> ALTER IBPORT "HCA-1:1" RESET COUNTERS

         InfiniBand Port HCA-1:1 successfully altered.

6.7.1.4 ALTER THRESHOLD

Purpose

The ALTER THRESHOLD command updates the attribute values of all thresholds or the specified thresholds.

Syntax

ALTER THRESHOLD { ALL |threshold_name [, threshold_name ...] }
   attribute_name = attribute_value 
   [, attribute_name = attribute_value]...

Usage Notes

The attributes that can be changed with the ALTER command are shown as modifiable in Example 6-40.

Examples

Example 6-22 shows how to alter threshold attributes.

Example 6-22 Altering Threshold Attributes

DBMCLI> ALTER THRESHOLD temp  warning=30

DBMCLI> ALTER THRESHOLD ALL occurrences=3

See Also:

"CREATE" for additional information about setting threshold attributes

6.7.1.5 ALTER USER

Purpose

The ALTER USER command changes the attributes of a user.

Syntax

ALTER USER username attribute_name = attribute_value      \
[, attribute_name = attribute_value, ...]

Usage Notes

  • The username cannot be root, dbmadmin or dbmmonitor. Those are reserved.

  • The user name should be unique.

  • The system prompts for a password for the new user. The password must have 12 to 40 alphanumeric characters or special characters !@#$%^&*() with at least one digit, one lowercase letter, and one uppercase letter.

  • The new password cannot be the same as the current password for the user.

Examples

Example 6-23 shows how to change a user's password.

Example 6-23 Using the ALTER USER Command

DBMCLI> ALTER USER scott password=TOPsecret2345

6.7.2 CREATE

Purpose

The CREATE command creates a new object and assigns initial attributes to the object.

Syntax

CREATE object_type [name] [attributename=attribute_value [, attributename=attribute_value]...]

Usage Notes

  • object_type can be as follows:

    • DBSERVER

    • DIAGPACK

    • ROLE

    • THRESHOLD

    • USER

  • name is the name of the new object.

  • attribute_value is the name of a modifiable attribute for the object_type.

  • attribute_value is the initial setting for the attribute.

  • When multiple objects are valid as the target of a CREATE command, there is the possibility of partial success. If an error occurs, then the command is interrupted, and the remaining objects are not created.

Related Topics

6.7.2.1 CREATE DBSERVER

Purpose

The CREATE DBSERVER command creates the DBSERVER object type.

Syntax

CREATE DBSERVER [name] 
    [interconnect1=intValue1 [, interconnect2=intValue2 ...]] 
    [ { , ipaddress1=ipValue1 [, ipaddress2=ipValue2 ...] }]
    [, attributeName = attributeValue ...]

Usage Notes

The attributes that can be set are shown as modifiable in DESCRIBE DBSERVER.

  • This command can be used to assign the ASR value to the snmpSubscriber attribute.

  • If a name is not provided, then the default is to set the database server name to the network host name of the server with hyphens in the network name replaced with underscores. You can display the network name with the uname -n command. If you change the database server name, then you must choose a unique database server name.

    If you provide a name, ensure that the name meets the guidelines.

  • One to four interconnects can be specified. The interconnect1 attribute must be specified if the interconnect2 attribute is specified. The interconnect1 and interconnect2 attributes must be specified if interconnect3 is specified, and so on.

  • If interconnectN and ipaddressN are specified, then an ipaddressN entry is automatically written to the /etc/oracle/cell/network-config/cellinit.ora file.

  • Interconnects are InfiniBand (ibN).

Examples

Example 6-24 shows the CREATE DBSERVER command with the interconnectN attribute.

Example 6-24 Setting the interconnectN attribute for the DBSERVER Object

DBMCLI> CREATE DBSERVER interconnect1=ib0

6.7.2.2 CREATE DIAGPACK

Purpose

The CREATE DIAGPACK command creates a diagnostic package, which contains logs and traces that you can use to troubleshoot problems in your system. You can also send the package to Oracle Support, as needed.

Syntax

CREATE DIAGPACK packStartTime=time, [durationInHrs=duration]

or

CREATE DIAGPACK alertName=alertName

Usage Notes

When an alert occurs, a diagnostic package is created automatically. This package contains logs and traces related to the alert.

The CREATE DIAGPACK command enables you to generate diagnostic packages manually.

  • The packStartTime parameter specifies when to start collecting the logs and traces. The format of packStartTime is:

    yyyy_MM_ddTHH_mm_ss
    

    For example: 2015_07_07T09_00_00

    You can also specify the keyword now for packStartTime. The packStartTime cannot be in the future and cannot be older than 7 days. The value of packStartTime is used as part of the name of the diagnostic package.

  • The durationInHrs parameter specifies the number of hours of logs and traces to include in the diagnostic package. Valid values are from 1 (default) to 6.

    Every diagnostic package includes logs 1 hour before and 1 hour after the packStartTime. For example, if you specify a time of 12_00_00, then logs will collected from 11_00_00 to 13_00_00, unless the end time is in the future.

  • The alertName parameter specifies the alert name for which to create the diagnostic package. You can run the LIST ALERTHISTORY command to view the alert names.

Name of Diagnostic Packages

The name of the diagnostic package is formed as follows:

hostname + packStartTime + unique package ID

For example: scaqab04adm08_2016_05_17T11_58_54_5_1.tar.bz2

For alerts, the name of the diagnostic package is formed as:

hostname + timestamp of when the package was created + alert ID

For example: scaqab04adm08_2016_05_17T11_58_54_5_1.tar.bz

Location of Diagnostic Packages

The location of the diagnostic packages is /opt/oracle/dbserver/dbms/deploy/log.

Status of Diagnostic Packages

You can run the LIST DIAGPACK command to get a list of diagnostic packages in your system, and their status.

Privileges Needed to Create, List, and Download Diagnostic Packages

Users need to be granted roles before they can download the diagnostic packages. Use DBMCLI to grant the following privileges to a role:
  • Privilege to create diagnostic packages:

    grant privilege CREATE ON DIAGPACK to ROLE role 
    
  • Privilege to list diagnostic packages and check their status:

    grant privilege LIST ON DIAGPACK to ROLE role 
    
  • Privilege to download diagnostic packages:

    grant privilege DOWNLOAD ON DIAGPACK to ROLE role 
    

You can then grant the role to users. For example, if you named your role diagpack_role, the following command grants the role to the user fred.

DBMCLI> GRANT ROLE diagpack_role TO USER fred

During deployment, Oracle Exadata Deployment Assistant (OEDA) creates an Exadata storage software user called CELLDIAG. You can use this user to connect to a cell remotely using ExaCLI or REST API. This user has privileges to create, list, and download diagnostic packages.

Downloading Diagnostic Packages

You can download diagnostic packages using any of the following methods. Note that you need the DOWNLOAD ON DIAGPACK privilege before you can download diagnostic packages.
  • Using the REST API

    • To download the diagnostic package by name, use the following URL, where hostname specifies the host name of the server and diagpackname specifies the name of the diagnostic package:

      https://hostname/diagpack/download?name=diagpackname
      

      If the user is not already logged in, the URL will prompt for a user name and password.

      Diagnostic packages can also be accessed at

      https://hostname/diagpack
      

      For example:

      https://dm01db01.example.com/diagpack
      

      The page then prompts the user to log in:

      User: fred
      Password: *******
      

      Based on the user's privileges, various sections of this page could be hidden. The form to create a new diagpack will not be shown if the user does not have the CREATE ON DIAGPACK privilege. Similarly, the list of alerts and their diagnostic packages will not be shown if the user does not have the LIST ON DIAGPACK privilege.

      To download the diagnostic package by alert name, use the following URL, where hostname specifies the host name of the server and alertName specifies the alert name of the diagnostic package:

      https://hostname/diagpack/download?alert=alertName
      

      This is the same alert name that is used in AlertHistory. It looks like 1, 2, 3 for stateless alerts, and 1_1, 2_1, 3_1, 3_2 for stateful alerts.

  • Using the download ExaCLI command

    ExaCLI enables you to run CellCLI commands on storage nodes remotely from compute nodes. To run the download command, run the following commands on a compute node:

    1. Start up ExaCLI and connect to the cell containing the diagnostic pack. Use a command similar to the following where hostname specifies the host name of the cell:

      exacli -l celladministrator -c hostname
      Password=********
      
    2. Run the download command. Use a command similar to the following where name specifies the name of the diagnostic package to download, and destinationFolder specifies the directory where you want to save the downloaded diagnostic package:

      exacli> download diagpack name destinationFolder 
      
  • Getting the diagnostic package from the alert emails

    The alert emails include diagnostic packages for all alerts except INFO, CLEAR, and WARNING. Diagnostic packages are generated for critical alerts only.

Turning Off the Diagnostic Pack Attachment in Emails

To turn off the diagnostic pack attachment in emails, use the command alter dbserver diagPackEmailAttach=FALSE. The diagnostic packs are still generated and stored on the system. To download the diagnostic packs, see the section "Downloading Diagnostic Packages."

Examples

Example 6-25 Using "now" for packStartTime

This example creates a diagnostic package using NOW as the start time and the default duration of one hour.

The output is a single compressed file in the directory /opt/oracle/dbserver/dbms/deploy/log.

DBMCLI> create diagpack packStartTime="now"
    Processing: dm01db01_diag_2015_07_08T17_53_58_1
    Use 'list diagPack' to check its status.

Example 6-26 Specifying a duration

This example creates 3 diagnostic packages under /opt/oracle/dbserver/dbms/deploy/log:

  • The first package has a start time of 2015_07_07T09_00_00.

  • The second package has a start time of 2015_07_07T10_00_00.

  • The third package has a start time of 2015_07_07T11_00_00.

DBMCLI> create diagpack packStartTime="2015_07_07T09_00_00", durationInHrs=3
    Processing: dm01db01_diag_2015_07_07T09_00_00_1
    dm01db01_diag_2015_07_07T10_00_00_1 (In queue...)
    dm01db01_diag_2015_07_07T11_00_00_1 (In queue...)
    Use 'list diagPack' to check its status.

6.7.2.3 CREATE ROLE

Purpose

The CREATE ROLE command creates a role for a user accessing a database server.

Syntax

CREATE ROLE  role_name1 [, role_name2, ...]

Usage Notes

The role name should be unique.

Examples

Example 6-27 shows how to create a role.

Example 6-27 Creating a Role

DBMCLI> CREATE ROLE dbmonitor

6.7.2.4 CREATE THRESHOLD

Purpose

The CREATE THRESHOLD command creates a threshold object that specifies the conditions for generation of a metric alert.

Syntax

CREATE THRESHOLD name attributename=value [, attributename=value]...

Usage Notes

The attributes that can be specified are comparison, critical, occurrences, observation, and warning.

  • The name argument is required. The name is comprised of a metric name and an object name with the format metricName.objectName, such as db_io_rq_sm_sec.db123 or ct_io_wt_rq.interactive.. Use the LIST METRICCURRENT metric command to display the available object name for metric. The object name is optional.

  • When a object name is not specified, then the threshold is applied to all metric objects for the given metric.

  • The comparison attribute is required with a condition value. The value must be '<', '<=', '=', '>=', or '>'.

  • The occurrences attribute specifies the number of consecutive measurements over the threshold value that trigger a state change.

    When specifying occurrences and observations, you need the specified number of consecutive occurrences of sample averages over the number of observations to cause an alert. For example, if the following five observations (observations=5) happen on a database server, then the average sample would be 10 because the number of consecutive occurrences (occurrences=2) had values of 5 and 15.

    Observation 1: 0
    Observation 2: 30
    Observation 3: 0
    Observation 4: 5
    Observation 5: 15
    
  • The observation attribute is the number of measurements over which measured values are averaged.

  • A state change to the value set in warning or critical causes a stateful alert to be generated.

Example 6-28 Creating a Threshold

This example shows how to create a threshold.

DBMCLI> CREATE THRESHOLD temp comparison='>', critical=30

See Also:

6.7.2.5 CREATE USER

Purpose

The CREATE USER command creates a user.

Syntax

CREATE USER name PASSWORD = *

Usage Notes

  • The user name should be unique.

  • The username cannot be root, dbmadmin or dbmmonitor. Those are reserved.

  • The system prompts for a password for the new user. The password must have 12 to 40 alphanumeric characters or special characters !@#$%^&*() with at least one digit, one lowercase letter, and one uppercase letter.

  • The new password cannot be the same as the current password for the user.

Examples

Example 6-29 shows how to create a user.

Example 6-29 Creating a User

DBMCLI> CREATE USER jdoe PASSWORD = *
password: 
Confirm password: password
User jdoe successfully created.

6.7.3 DESCRIBE

Purpose

The DESCRIBE command displays a list of attributes for the object type that is provided as an argument. The tag modifiable indicates whether an attribute can be modified using the ALTER command.

Syntax

DESCRIBE object_type

Usage Notes

  • The object_type is one of the supported object types.

  • The list of attributes can be used as arguments in the LIST command.

  • DESCRIBE does not display all of the attributes for the objects.

Related Topics

6.7.3.1 DESCRIBE ALERTDEFINITION

Purpose

The DESCRIBE ALERTDEFINITION command displays a list of attributes for the ALERTDEFINITION object type.

Syntax

DESCRIBE ALERTDEFINITION

Usage Notes

Table 6-4 lists the attributes for the DESCRIBE ALERTDEFINITION command.

Table 6-4 DESCRIBE ALERTDEFINITION Attributes

Attribute Description

alertShortName

Abbreviated name for the alert. If the alert is based on a metric, then the short name is the same as the corresponding metric name attribute.

alertSource

Source of the alert, such as BMC or ADR.

alertType

Type of the alert. Values are stateful or stateless.

  • Stateful alerts are automatically cleared on transition to normal.

  • Stateless alerts are never cleared. You can change the alert by setting the examinedBy attribute.

description

Description for the alert.

metricName

Metric name if the alert is based on a metric.

name

Identifier for the alert.

Examples

Example 6-30 shows the DESCRIBE command with the ALERTDEFINITION object.

Example 6-30 Describing the ALERTDEFINITION Object

DBMCLI> DESCRIBE ALERTDEFINITION

         name
         alertShortName
         alertSource
         alertType
         description
         metricName

6.7.3.2 DESCRIBE ALERTHISTORY

Purpose

The DESCRIBE ALERTHISTORY command displays a list of attributes for the ALERTHISTORY object type.

Syntax

DESCRIBE ALERTHISTORY

Usage Notes

The following table lists the attributes for the DESCRIBE ALERTHISTORY command.

Table 6-5 DESCRIBE ALERTHISTORY Attributes

Attribute Description

alertAction

Recommended action to perform for this alert.

alertMessage

Brief explanation of the alert.

alertSequenceID

Unique sequence ID for the alert. When an alert changes its state, such as warning to critical or critical to clear, another occurrence of the alert is created with the same sequence number and a time stamp of the transition.

alertShortName

Abbreviated name for the alert. If the alert is based on a metric, then the short name is the same as the corresponding metric name attribute.

alertType

Type of the alert. Values are stateful or stateless.

  • Stateful alerts are automatically cleared on transition to normal.

  • Stateless alerts are never cleared. You can change the alert by setting the examinedBy attribute.

beginTime

Time stamp when an alert changes its state.

endTime

Time stamp for the end of the period when an alert changes its state.

examinedBy

Administrator who reviewed the alert.

failedMail

Intended e-mail recipient when a notification failed.

failedSNMP

Intended SNMP subscriber when a notification failed.

metricObjectName

Object, such as database server disk for which a metric threshold has caused an alert.

metricValue

Value of the metric that caused the alert.

name

Unique identifier for the alert.

notificationState

Number indicating progress in notifying subscribers to alert messages:

  • 0: never tried

  • 1: sent successfully

  • 2: retrying, up to 5 times

  • 3: 5 failed retries

sequenceBeginTime

Time stamp when an alert sequence ID is first created.

severity

Severity level. Values are clear, info, warning, or critical.

Examples

Example 6-31 shows the DESCRIBE command with the ALERTHISTORY object.

Example 6-31 Describing the ALERTHISTORY Object

DBMCLI> DESCRIBE ALERTHISTORY

         name
         alertAction
         alertMessage
         alertSequenceID
         alertShortName
         alertType
         beginTime
         endTime
         examinedBy              modifiable
         failedMail
         failedSNMP
         metricObjectName
         metricValue
         notificationState
         sequenceBeginTime
         severity

Related Topics

6.7.3.3 DESCRIBE DBSERVER

Purpose

The DESCRIBE DBSERVER command displays a list of attributes for the DBSERVER object type.

Syntax

DESCRIBE DBSERVER

Usage Notes

Table 6-6 lists the attributes for the DESCRIBE DBSERVER command.

Table 6-6 DESCRIBE DBSERVER Attributes

Attribute Description

bbuStatus

Status of hard disk controller battery-backed unit (BBU).

comment

User-supplied text string.

cpuCount

Number of CPUs on the database server.

diagHistoryDays

Number of days ADR files are retained. The default is 7 days.

diagPackEmailAttach

Whether a diagpack is included as an attachment in the alert email or not. The default is true.

diagPackUploadEnabled

Whether the auto diagpack upload feature is enabled or not. The default is true.

emailFormat

File format for e-mail messages. The value can be HTML or text.

fanCount

Count of working fans and total fans, displayed as working/total.

fanStatus

Status of the fan. The value can be normal, warning, or critical.

id

Global unique identifier (GUID) supplied by the hardware vendor.

interconnect1-4

Interconnect 1 to 4 for the database server. For example: bondeth0.

interconnectCount

Number of network interconnects.

ipaddress1-4

IP address 1 to 4 for the database server.

kernelVersion

Version of the host kernel software.

location

Physical location of the cell hardware supplied by the user.

locatorLEDStatus

Status of cell LOCATE LED. The value can be on or off.

makeModel

Make and model of the cell hardware supplied by the vendor.

metricCollection

Indicator for whether Management Server performs metric collection. Values are TRUE or FALSE. If set to FALSE, then all collection and alert mining is stopped. The default setting is TRUE.

metricHistoryDays

Number of days metric history files are retained. The default is 7 days.

msVersion

Version of the management server.

name

Name of the database server.

notificationMethod

Notification method for alerts. The value should be mail, snmp, none, or both mail and snmp.

notificationPolicy

Indicator for severity alerts to be sent to subscribers. The value for notificationPolicy should be none or any combination of critical, warning, and clear.

powerCount

Count of power supplies, displayed as working/total.

powerStatus

Status of the power. The value can be normal, warning, or critical.

releaseImageStatus

Indicator for knowing whether imaging is successful or not.

releaseTrackingBug

Patch number for the cell software, such as 11223344.

releaseVersion

Release number for the cell software, such as 11.2.2.3.0.

rescuePlan

A list of commands that you can run after a server rescue to restore settings, such as thresholds and notifications, to the last known values.

smtpFrom

SMTP e-mail user name that appears in alert notifications.

smtpFromAddr

SMTP e-mail address from which alert notifications are sent.

smtpPort

SMTP e-mail server port used to send alert notifications.

smtpPwd

Password of the SMTP e-mail user that sends alert notifications.

smtpServer

SMTP e-mail server used to send alert notifications.

smtpSubscriber

List of hosts that subscribe to the SNMP alert notifications.

smtpToAddr

Address to which e-mail is sent. It can be a comma-delimited list in quotation marks to allow multiple subscribers to alerts.

smtpUser

SMTP e-mail user name that is displayed in alert notifications.

smtpUseSSL

Specification to use Secure Socket Layer (SSL) authentication.

status

Status of the database server.

syslogConf

Rules for the system logging utility syslogd.

temperatureReading

Current temperature (Celsius) of the cell obtained from the BMC.

temperatureStatus

Status of the temperature. The value can be normal, warning, or critical.

traceLevel

Level for which trace messages are written. This can be a valid Java logging level (SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST) or a valid Oracle Diagnostic Logging (ODL) logging level (INCIDENT_ERROR:1, ERROR:1, WARNING:1, NOTIFICATION:1, NOTIFICATION:16, TRACE:1, TRACE:16, TRACE:32). The default is INFO.

upTime

Time (days, hours:minutes) since the system was restarted.

Examples

Example 6-32 Describing the DBSERVER Object

DBMCLI> describe dbserver

        name                   modifiable
        bbuStatus
        comment                modifiable
        coreCount
        cpuCount
        diagHistoryDays        modifiable
        diagPackEmailAttach    modifiable
        diagPackUploadEnabled  modifiable
        emailFormat            modifiable
        emailSubscriber        modifiable
        fanCount
        fanStatus
        iaasIdleInUse          modifiable
        iaasMode               modifiable
        iaasReason             modifiable
        id
        interconnectCount
        interconnect1          modifiable
        interconnect2          modifiable
        interconnect3          modifiable
        interconnect4          modifiable
        interconnect5          modifiable
        interconnect6          modifiable
        interconnect7          modifiable
        interconnect8          modifiable
        ipaddress1
        ipaddress2
        ipaddress3
        ipaddress4
        ipaddress5
        ipaddress6
        ipaddress7
        ipaddress8
        kernelVersion
        locatorLEDStatus
        location               modifiable
        makeModel
        metricCollection       modifiable
        metricHistoryDays      modifiable
        msVersion
        notificationMethod     modifiable
        notificationPolicy     modifiable
        pendingCoreCount       modifiable
        powerCount
        powerStatus
        releaseImageStatus
        releaseVersion
        releaseTrackingBug
        securityCert           modifiable
        securityPrivKey        modifiable
        securityPrivKeyPW      modifiable
        securityPubKey         modifiable
        smtpFrom               modifiable
        smtpFromAddr           modifiable
        smtpPort               modifiable
        smtpPwd                modifiable
        smtpServer             modifiable
        smtpToAddr             modifiable
        smtpUser               modifiable
        smtpUseSSL             modifiable
        snmpSubscriber         modifiable
        snmpUser               modifiable
        status
        syslogConf             modifiable
        temperatureReading
        temperatureStatus
        traceLevel             modifiable
        upTime
        msStatus
        rsStatus

6.7.3.4 DESCRIBE IBPORT

Purpose

The DESCRIBE IBPORT command displays a list of attributes for the IBPORT object type.

Syntax

DESCRIBE IBPORT

Usage Notes

Table 6-7 DESCRIBE IBPORT Attributes

Attribute Description

activeSlave

Indicator whether the port is currently the active port for the bonded IP.

dataRate

The data rate of the InfiniBand port.

hcaFWVersion

The version of the host channel adapter firmware.

id

The Global unique identifier (GUID) of the InfiniBand port.

lid

The local identifier of the InfiniBand port. It is unique within the subnet, and the 16-bit identifiers are used within a network by switches for routing.

linkDowned

The number of times the port training state machine has failed the link error recovery process, and halted the link.

linkIntegrityErrs

The number of link integrity errors.

linkRecovers

The number of times the port training state machine has successfully completed the link error recovery process.

name

The name of the InfiniBand port.

physLinkState

The physical link state.

portNumber

The port number of the InfiniBand port.

rcvConstraintErrs

The number of received constraint errors experienced by the InfiniBand port.

rcvData

The number of 32-bit data words received by the InfiniBand port.

rcvErrs

The number of packets received at the InfiniBand port containing an error.

rcvRemotePhysErrs

The number of physical errors experienced at the InfiniBand port.

status

The link status.

symbolErrs

The number of minor link errors experienced at the InfiniBand port.

vl15Dropped

The number of incoming VL15 packets dropped at the InfiniBand port due to resource limitations, such as lack of buffers.

xmtConstraintErrs

The number of transmitted constraint errors experienced at the InfiniBand port.

xmtData

The number of 32-bit data words transmitted on the InfiniBand port.

xmtDiscards

The number of outbound packets discarded by the InfiniBand port because the port was down or congested.

Example 6-33 Describing the IBPORT Object

This example shows the DESCRIBE command with the IBPORT object.

DBMCLI> DESCRIBE IBPORT

        name
        activeSlave
        dataRate
        hcaFWVersion
        id
        lid
        linkDowned
        linkIntegrityErrs
        linkRecovers
        physLinkState
        portNumber
        rcvConstraintErrs
        rcvData
        rcvErrs
        rcvRemotePhysErrs
        status
        symbolErrs
        vl15Dropped
        xmtConstraintErrs
        xmtData
        xmtDiscards

6.7.3.5 DESCRIBE LUN

Purpose

The DESCRIBE LUN command displays a list of attributes for the LUN object type.

Syntax

DESCRIBE LUN

Usage Notes

Table 6-8 DESCRIBE LUN Attributes

Attribute Description

deviceName

Operating system device name for the LUN. For example, /dev/c1d5

diskType

The type of disk.

errorCount

Number of errors on this LUN.

id

Identifier assigned by the system.

lunSize

Raw size of the LUN before being converted to a database server disk.

lunUID

Unique identifier assigned by the system.

name

Unique name assigned to the LUN. This might be different (or extended from) the LUN ID if the ID is not unique.

overProvisioning

Indicator of the percentage of over-provisioned blocks in flash storage that are still available for a particular LUN. This attribute is only used for flash disks.

raidLevel

Value of the RAID level that is used on the LUN. For example: RAID 0.

status

Status of the LUN, which can be normal, warning, or critical.

Example 6-34 Describing the LUN Object

This example shows the DESCRIBE command with the LUN object.

DBMCLI> DESCRIBE LUN

         name
         deviceName
         diskType
         errorCount
         id
         lunSize
         lunUID
         overProvisioning
         raidLevel
         status

6.7.3.6 DESCRIBE METRICCURRENT

Purpose

The DESCRIBE METRICCURRENT command displays a list of attributes for the METRICCURRENT object type.

Syntax

DESCRIBE METRICCURRENT

Usage Notes

Table 6-9 DESCRIBE METRICCURRENT Attributes

Attribute Description

alertState

Indicator of the alert state. Values are normal, warning, or critical.

collectionTime

Time stamp when the metric value was collected.

metricObjectName

Name of the object, such as database server being measured.

metricType

Specification for how the statistic was created or defined.

metricValue

Value of the metric when it was collected.

name

Unique name of the current metric.

objectType

Options are DBSERVER, DBSERVER_FILESYSTEM, and IBPORT.

Example 6-35 Describing the METRICCURRENT Object

This example shows the DESCRIBE command with the METRICCURRENT object.

DBMCLI> DESCRIBE METRICCURRENT

         name
         alertState
         collectionTime
         metricObjectName
         metricType
         metricValue
         objectType

Related Topics

6.7.3.7 DESCRIBE METRICDEFINITION

Purpose

The DESCRIBE METRICDEFINITION command displays a list of attributes for the METRICDEFINITION object type.

Syntax

DESCRIBE METRICDEFINITION

Usage Notes

Table 6-10 lists the attributes for the DESCRIBE METRICDEFINITION command.

Table 6-10 DESCRIBE METRICDEFINITION Attributes

Attribute Description

description

Description of the metric.

metricType

Indicator of how the statistic was created or defined. The options are as follows:

  • cumulative: Cumulative statistics since the metric was created.

  • instantaneous: Value at the time that the metric is collected.

  • rate: Rates computed by averaging statistics over observation periods.

  • transition: Transition metrics are collected at the time their value has changed and typically capture important transitions in hardware status.

name

Unique name of the metric definition. The value of the name attribute is a composite of abbreviations. The attribute value starts with an abbreviation of the object type on which the metric is defined:

  • DS_ (database server)

  • N_ (network)

objectType

Options are DBSERVER, DBSERVER_FILESYSTEM, and IBPORT.

persistencePolicy

Amount of time metric values are stored.

unit

Unit for the metric explicitly, and is related to the metric collected:

  • Number

  • % (percentage)

  • F (Fahrenheit)

  • C (Celsius)

Example 6-36 Describing the METRICDEFINITION Object

This example shows the DESCRIBE command with the METRICDEFINITION object.

DBMCLI> DESCRIBE METRICDEFINITION

         name
         description
         metricType
         objectType
         persistencePolicy
         unit

6.7.3.8 DESCRIBE METRICHISTORY

Purpose

The DESCRIBE METRICHISTORY command displays a list of attributes for the METRICHISTORY object type.

Syntax

DESCRIBE METRICHISTORY

Usage Notes

Table 6-11 lists the attributes for the DESCRIBE METRICHISTORY command.

Table 6-11 DESCRIBE METRICHISTORY Attributes

Attribute Description

alertState

Indicator of the alert state. Values are normal, warning, or critical.

collectionTime

Time stamp when the metric value was collected.

memory

The metrics in Management Server memory. This attribute can be used instead of the collectionTime attribute when the collection time is less than an hour.

metricObjectName

Name of the object, such as database server disk being measured.

metricType

Specification for how the statistic was created or defined.

metricValue

Value of the metric when it was collected.

metricValueAvg

Average value of the metric.

metricValueMax

Maximum value of the metric.

metricValueMin

Minimum value of the metric.

name

Unique name of the current metric.

objectType

Options are DBSERVER, DBSERVER_FILESYSTEM, and IBPORT

over

Specification for amount of time in minutes for the aggregation. This attribute works in conjunction with the max, min and avg keywords.

Example 6-37 Describing the METRICHISTORY Object

This example shows the DESCRIBE command with the METRICHISTORY object.

DBMCLI> DESCRIBE METRICHISTORY

         name
         alertState
         collectionTime
         memory
         metricObjectName
         metricType
         metricValue
         metricValueAvg
         metricValueMax
         metricValueMin
         objectType
         over

6.7.3.9 DESCRIBE PHYSICALDISK

Purpose

The DESCRIBE PHYSICALDISK command displays a list of attributes for the PHYSICALDISK object type.

Syntax

DESCRIBE PHYSICALDISK

Usage Notes

Table 6-12 lists the attributes for the DESCRIBE PHYSICALDISK command.

Table 6-12 DESCRIBE PHYSICALDISK Attributes

Attribute Description

ctrlHwVersion

Controller version. This attribute is only applicable to Oracle Exadata Storage Server Software on HP Oracle Database Machine.

diskType

Type of the disk, whether it is a HARDDISK or a FLASHDISK.

enclosureDeviceId

Identifier for the hard disk enclosure. This attribute is only applicable to Oracle Exadata Storage Server Software on Oracle Exadata Storage Server.

errCmdTimeoutCount

Count of the number of command timeout SCSI errors on the disk. This attribute is only applicable to Oracle Exadata Storage Server Software on HP Oracle Database Machine.

errHardReadCount

Count of the number of hard read errors on the disk. This attribute is only applicable to Oracle Exadata Storage Server Software on HP Oracle Database Machine.

errHardWriteCount

Count of the number of hard write errors on the disk. This attribute is only applicable to Oracle Exadata Storage Server Software on HP Oracle Database Machine.

errMediaCount

Count of the number of media errors on the hard disk. This attribute is only applicable to Oracle Exadata Storage Server Software on Oracle Exadata Storage Server.

errOtherCount

Count of unclassified errors on the hard disk. This attribute is only applicable to Oracle Exadata Storage Server Software on HP Oracle Database Machine.

errSeekCount

Count of the number of SCSI seek errors on the disk. This attribute is only applicable to Oracle Exadata Storage Server Software on HP Oracle Database Machine.

hotPlugCount

Count of the times the disk has been inserted into the rack. This attribute is only applicable to Oracle Exadata Storage Server Software on HP Oracle Database Machine.

lastFailureReason

Type of the most-recent error on the disk. This attribute is only applicable to Oracle Exadata Storage Server Software on HP Oracle Database Machine.

luns

List of LUNs converted from this disk.

makeModel

Model description provided by the system.

name

Unique name of the physical disk.

physicalFirmware

System-assigned name of the firmware for the disk. This attribute is only applicable to Oracle Exadata Storage Server Software on HP Oracle Database Machine.

physicalInsertTime

Time that the disk was inserted.

physicalInterface

Interface type used by the hard disk. For example, SAS

physicalPort

Port on the controller for this disk. This attribute is only applicable to Oracle Exadata Storage Server Software on HP Oracle Database Machine.

physicalRPM

Disk revolutions per minute. This attribute is only applicable to Oracle Exadata Storage Server Software on HP Oracle Database Machine.

physicalSerial

System-assigned unique ID.

physicalSize

Size of the disk in bytes.

physicalUseType

Intended use of the disk. For example, Data Drive.

sectorRemapCount

Count of all sector remap operations for the physical disk. This attribute is only applicable to Oracle Exadata Storage Server Software on HP Oracle Database Machine.

slotNumber

Physical location of disk.

status

Status of the physical disk. Values can be as follows:

  • failed: disk has failed. In earlier releases, this status was called critical.

  • normal: disk is functioning normally

  • not present: disk has been removed

  • peer failure: flash disk failure only

  • poor performance: disk is performing poorly

  • predictive failure: disk is expected to fail

  • write-through caching: flash disk caching only.

Examples

Example 6-38 shows the DESCRIBE command with the PHYSICALDISK object on Oracle Exadata Storage Server.

Example 6-38 Describing the PHYSICALDISK Object on a Hard Drive in a Database Server

DBMCLI> DESCRIBE PHYSICALDISK

         name
         ctrlFirmware
         diskType
         enclosureDeviceId
         errMediaCount
         errOtherCount
         luns
         makeModel
         physicalFirmware
         physicalInsertTime
         physicalInterface
         physicalSerial
         physicalSize
         slotNumber
         status

6.7.3.10 DESCRIBE ROLE

Purpose

The DESCRIBE ROLE command displays a list of attributes for the ROLE object type.

Syntax

DESCRIBE ROLE

Usage Notes

Table 6-13 DESCRIBE ROLE Attributes

Attribute Description

name

Unique name of the user assigned the role.

privileges

Privileges granted to the role.

Examples

Example 6-39 Describing the ROLE Object

This example shows the DESCRIBE command with the ROLE object.

DBMCLI> DESCRIBE ROLE
        name
        privileges

6.7.3.11 DESCRIBE THRESHOLD

Purpose

The DESCRIBE THRESHOLD command displays a list of attributes for the THRESHOLD object type.

Syntax

DESCRIBE THRESHOLD

Usage Notes

Table 6-14 lists the attributes for the DESCRIBE THRESHOLD command.

Table 6-14 DESCRIBE THRESHOLD Attributes

Attribute Description

comparison

Operator for comparing the metric value to the threshold value (>, >=, =, <, <=) to determine whether the value violates the threshold.

critical

Limit beyond which the metric value is considered to be in the critical state for generating alerts.

name

Unique name of the threshold.

observation

Number of measurements over which the rate metric is averaged before being compared with the threshold value.

occurrences

Number of consecutive violations of the threshold limit by the metric value before the appropriate alert is issued.

warning

Limit beyond which the metric value is considered to be in the warning state for generating alerts.

Example 6-40 Describing the THRESHOLD Object

This example shows the DESCRIBE command with the THRESHOLD object.

DBMCLI> DESCRIBE THRESHOLD

         name
         comparison              modifiable
         critical                modifiable
         observation             modifiable
         occurrences             modifiable
         warning                 modifiable

6.7.3.12 DESCRIBE USER

Purpose

The DESCRIBE USER command displays a list of attributes for the USER object type.

Syntax

DESCRIBE USER

Usage Notes

The following table lists the attributes for the DESCRIBE USER command.

Table 6-15 DESCRIBE USER Attributes

Attribute Description

name

Unique name of the user.

roles

Roles assigned to the user.

Example 6-41 Describing the USER Object

This example shows the DESCRIBE command with the USER object.

DBMCLI> DESCRIBE USER

         name
         roles 

6.7.4 DROP

Purpose

The DROP command removes the named objects from the database server or resets a database server.

Syntax

DROP object_type [object_name [, object_name]...] [options]

Usage Notes

  • object_type can be one of the following:

    • ALERTHISTORY

    • DBSERVER

    • ROLE

    • THRESHOLD

    • USER

  • object_name is the name of a database server disk, role, threshold, or user.

  • When multiple objects are the target of a DROP command, there is the possibility of partial success. If an error occurs, then the command is interrupted, and the remaining objects are not dropped.

Related Topics

6.7.4.1 DROP ALERTHISTORY

Purpose

The DROP ALERTHISTORY command removes alerts from the alert history of a database server.

Syntax

DROP ALERTHISTORY {ALL | alert1 {, alert2}, ...}

Usage Notes

  • In the command, alertN is the name of the alert to be dropped from the history.

  • When dropping stateful alerts, you must drop all members of the alert sequence at the same time. If you do not drop all members, then an error is issued by the system.

Example 6-42 Dropping a Database Server Alert History

DBMCLI> DROP ALERTHISTORY 1, 2_1, 2_2

6.7.4.2 DROP DBSERVER

Purpose

The DROP DBSERVER command resets MS on the database server to its original state.

Syntax

DROP DBSERVER

Usage Notes

  • Any thresholds that were set for the database server are also dropped for the database server.

  • The DBSERVER attributes are set to their default values.

Example 6-43 Dropping a Database Server

DBMCLI> DROP DBSERVER

6.7.4.3 DROP ROLE

Purpose

The DROP ROLE command removes user roles from the cell.

Syntax

DROP ROLE  { ALL | role_name1 [, role_name2, ...]} [FORCE]

Usage Notes

The FORCE option drops the role even if the role has been granted to a user.

Example 6-44 Dropping a Role

DBMCLI> DROP ROLE r1,r2

6.7.4.4 DROP THRESHOLD

Purpose

The DROP THRESHOLD command removes all or the specified thresholds from the database server.

Syntax

DROP THRESHOLD { ALL |threshold_name [, threshold_name ...] }

Example 6-45 Dropping Thresholds

DBMCLI> DROP THRESHOLD temp

6.7.4.5 DROP USER

Purpose

The DROP USER command removes a user from a database server.

Syntax

DROP USER { ALL | user1 [, user2]... }

Usage Notes

  • user(n) is the name of a user to drop.

Example 6-46 Dropping a User

DBMCLI>DROP USER jdoe

6.7.5 GRANT

Purpose

The GRANT command sets attributes for privileges and roles.

Syntax

GRANT object_type [name] TO sub_object_type [sub_object_name]

Usage Notes

  • object_type can be as follows:

    • PRIVILEGE

    • ROLE

  • The following can be used for PRIVILEGE object type:

    • name is in the following format:

      { ALL ACTIONS | action } ON { ALL OBJECTS | object }               \
      [{ ALL ATTRIBUTES | ATTRIBUTES attribute1 [, attribute2, ...] }]   \
      [{ WITH ALL OPTIONS | WITH OPTIONS option1 [, option2, ...] }]
      
    • The sub_object_type must be ROLE.

    • The sub_object_name is the name of the role.

  • The following can be used for the ROLE object type:

    • name is the role name.

    • The sub_object_type must be USER.

    • The sub_object_name is the name of the user.

6.7.5.1 GRANT PRIVILEGE

Purpose

The GRANT PRIVILEGE command sets the access privileges for a role.

Syntax

GRANT PRIVILEGE { ALL ACTIONS | action } ON { ALL OBJECTS | object }   \
{ ALL ATTRIBUTES | ATTRIBUTES attribute1 [, attribute2, ...] }         \
{ WITH ALL OPTIONS | WITH OPTIONS option1 [, option2, ...] }           \
TO ROLE { ALL | role1 [, role2, ...] }

Usage Notes

  • action is the command. Examples: alter, create, describe, drop, export, import, list.

    Notes:

    • The grant and revoke commands cannot be granted.

    • create user and drop user cannot be granted.

    • create role and drop role cannot be granted.

  • object is object type for the action. It can be any DBMCLI object. Examples: dbserver, threshold, ibport, alerthistory, role.

  • attribute are the attributes for the object. To get a list of attributes for an object, run the LIST object_type command.

  • option are the options for the object. Examples: DETAIL, LIMIT, ORDER BY, WHERE.

  • role is the name of the role to grant privileges.

  • The ALL ACTIONS argument grants privileges for all actions.

  • The ALL OBJECTS argument grants privileges for all objects.

  • The ALL ATTRIBUTES argument grants privileges for all attributes.

  • The WITH ALL OPTIONS argument grants privileges for all options.

  • Specifying attributes and WITH OPTIONS is optional. If they are not specified, then all attributes and options are granted with the privilege.

Examples

Example 6-47 shows how to grant privileges to a role.

Example 6-48 shows how to grant all attributes and options for a specified action and object to a role.

Example 6-49 shows how to grant all options with a specified action, object and attributes to a role.

Example 6-50 shows how to grant all attributes with a specified action, object, and options to a role.

Example 6-47 Granting Privileges to a Role

DBMCLI> GRANT PRIVILEGE list on alerthistory ATTRIBUTES alertAction,alertMessage  \
        WITH OPTIONS detail TO ROLE dbmonitor

Example 6-48 Granting All Attributes and Options to a Role

DBMCLI> GRANT PRIVILEGE { ALL ACTIONS | action } ON { ALL OBJECTS | object } to ROLE role1

Example 6-49 Granting All Options with Specified Action, Object and Attributes

DBMCLI> GRANT PRIVILEGE { ALL ACTIONS | action } ON { ALL OBJECTS | object }  \
ATTRIBUTES attribute1 [, attribute2, ...] to ROLE role1

Example 6-50 Granting All Attributes with Specified Action, Object and Options

DBMCLI> GRANT PRIVILEGE { ALL ACTIONS | action } ON { ALL OBJECTS | object }   \
WITH OPTIONS option1 [, option, ...] to ROLE role1

6.7.5.2 GRANT ROLE

Purpose

The GRANT ROLE command sets the role for a user.

Syntax

GRANT ROLE { ALL | role1 [, role2, ...] } TO USER { ALL | user1 [, user2...] }

Usage Notes

  • role is the name of the role.

  • The ALL argument grants all roles to the user.

  • The TO USER ALL argument grants the role to all users.

Example 6-51 Granting a Role to a User

This example shows how to grant a role to a user.

DBMCLI> GRANT ROLE dbmonitor TO USER agarcia

6.7.6 HELP

Purpose

The HELP command displays syntax and usage descriptions for all DBMCLI commands.

Syntax

HELP [help_topic]

If no topic argument is provided, HELP displays the name of all available topics. If a topic is specified, then detailed help text is displayed for that topic.

Example 6-52 shows examples of the HELP command.

Example 6-52 Display Help Text with the HELP Command

DBMCLI> HELP
DBMCLI> HELP ALTER
DBMCLI> HELP DROP ALERTHISTORY

6.7.7 LIST

Purpose

The LIST command displays attributes for database server objects. Objects displayed are identified by name or by filters. The attributes displayed for each object are determined by the specified attribute list.

Syntax

LIST object_type  [ name |  attribute_filters] [attribute_list] 
[DETAIL] [ORDER BY order_by_attribute_list] [LIMIT integer]

Usage Notes

  • object_type can be the following:

    • ALERTDEFINITION

    • ALERTHISTORY

    • DBSERVER

    • IBPORT

    • LUN

    • METRICCURRRENT

    • METRICDEFINITION

    • METRICHISTORY

    • PHYSICALDISK

    • ROLE

    • THRESHOLD

    • USER

  • Using LIST with only an object_type (without the DETAIL option or an attribute list) displays the names of the existing objects of this type and a default list of attributes.

    • For an object type that has a status attribute, the object name and the status are displayed.

    • For the METRICHISTORY object type, the collection time, the object name, and value are displayed.

    • For the PHYSICALDISK and LUN object types, the ID attribute is displayed.

    • For the ALERTHISTORY object type, the time and alert message are displayed.

    • For the KEY object type, the key value is displayed.

  • The attributes displayed for each object are determined by the specified attribute list. Attribute values that are strings with embedded blank spaces or tabs must be enclosed in quotation marks.

  • Attribute filters determine the specific objects that are displayed. Because of the amount of metrics, you should use filters when using the LIST METRICCURRENT or LIST METRICHISTORY commands to narrow the output of the command.

  • In the default format without the DETAIL option, each object is displayed on a separate line, with successive attribute values separated by tabs in the order of the specified list of attributes.

  • In the DETAIL format, each attribute of a specific object is displayed on a separate line, with an attribute name followed by its value. If no attribute list is provided, then all attributes that have values are displayed. Blank lines separate each object in the display. DETAIL is similar to the ATTRIBUTES ALL option, only the format is different.

  • Attributes that are not set are not listed with the DETAIL option. However, attributes that are set to an empty value are listed with the DETAIL option.

  • ORDER BY orders the objects by attributes in ascending or descending order. The default is ascending.

  • LIMIT sets a limit on the number of objects to display.

See Also:

6.7.7.1 LIST ALERTDEFINITION

Purpose

The LIST ALERTDEFINITION command displays all available sources of the alerts on the database server.

Syntax

LIST ALERTDEFINITION [ name |  attribute_filters ]  [attribute_list]  [DETAIL]

Usage Notes

The list of attributes that can be displayed is shown in Example 6-30.

Examples

Example 6-53 shows the LIST command with the ALERTDEFINITION object.

Example 6-53 Listing ALERTDEFINITION Attributes

DBMCLI> LIST ALERTDEFINITION HardwareAlert DETAIL
         name:                   HardwareAlert
         alertShortName:         Hardware
         alertSource:            Hardware
         alertType:              Stateless
         description:            "Hardware Alert"
         metricName:            

6.7.7.2 LIST ALERTHISTORY

Purpose

The LIST ALERTHISTORY command displays all alerts that occurred on the database server.

Syntax

LIST ALERTHISTORY [ name |  attribute_filters ]  [attribute_list]  [DETAIL]

Usage Notes

The list of attributes that can be displayed is shown in Example 6-31.

A WHERE clause can include the ageInMInutes attribute to specify the list is limited to those alerts which have the specified age. For example, the following command would show the alerts created in the previous 15 minutes:

DBMCLI> LIST ALERTHISTORY WHERE ageInMinutes < 15

Examples

Example 6-54 shows the LIST command with the ALERTHISTORY object.

Example 6-54 Listing ALERTHISTORY Attributes

DBMCLI> LIST ALERTHISTORY 1_1 DETAIL
        name:                   1_1
        alertDescription:       "Data hard disk of size 300GB in slot 3 entered
                                 predictive failure status"
        alertMessage:           "Data hard disk entered predictive failure status.
                                 Status        : WARNING - PREDICTIVE FAILURE 
                                 Manufacturer  : HITACHI  Model
                                 Number  : H103030SCSUN300G  Size          : 300GB 
                                 Serial Number : 1026GZKMDE 
                                 Firmware      : A2A8  Slot Number   : 3"
        alertSequenceID:        1
        alertShortName:         Hardware
        alertType:              Stateful
        beginTime:              2014-09-22T20:18:23-05:00
        examinedBy:            
        metricObjectName:       252:3
        notificationState:      0
        sequenceBeginTime:      2014-09-22T20:18:23-05:00
        severity:               critical
        alertAction:            "Informational. The hard disk has entered
predictive failure status. A white DB server locator LED has been turned on to
help locate the affected cell, and an amber service action LED has been lit on the
drive to help locate the affected drive. Detailed information on this problem can
be found at
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=1112995.1
Automatic Service Request has been notified with Unique Identifier:
c84839be-e8d8-4e5e-b315-e145ccd7cbc8."

6.7.7.3 LIST DBSERVER

Purpose

The LIST DBSERVER command displays all alerts that occurred on the database server.

Syntax

LIST DBSERVER [ name |  attribute_filters ]  [attribute_list]  [DETAIL]

Usage Notes

The list of attributes that can be displayed is shown in Example 6-32.

Examples

Example 6-55 shows the output of the LIST DBSERVER DETAIL command.

Example 6-56 shows how to display the value of the rescuePlan attribute.

Example 6-55 Listing DBSERVER Attributes

DDBMCLI> LIST DBSERVER DETAIL
         name:                   myexadb03
         bbuStatus:              normal
         cpuCount:               24
         diagHistoryDays:        7
         fanCount:               16/16
         fanStatus:              normal
         id:                     1029FMM085
         interconnectCount:      2
         ipaddress1:             192.168.10.25/22
         kernelVersion:          2.6.39-400.220.0.el6uek.x86_64
         locatorLEDStatus:       on
         makeModel:              Oracle Corporation SUN FIRE X4170 M2 SERVER
         metricHistoryDays:      7
         msVersion:              OSS_MAIN_LINUX.X64_140921
         powerCount:             2/2
         powerStatus:            normal
         releaseImageStatus:     success
         releaseVersion:         12.1.2.1.0.140728
         releaseTrackingBug:     17885582
         snmpSubscriber:          
         host=10.133.131.130,port=162,community=public,type=asr
         status:                 online
         temperatureReading:     20.0
         temperatureStatus:      normal
         upTime:                 55 days, 5:12
         msStatus:               running
         rsStatus:               running

DBMCLI> LIST DBSERVER attributes status,uptime
         online  161 days, 3:11

Example 6-56 Displaying the rescuePlan Attribute

DDBMCLI> LIST DBSERVER ATTRIBUTES rescuePlan

CREATE ROLE "listdbserverattrs"

GRANT PRIVILEGE list ON dbserver ATTRIBUTES bbuStatus, coreCount WITH all options TO ROLE "listdbserverattrs"

ALTER DBSERVER diagHistoryDays="7", metricHistoryDays="7", bbuLearnSchedule="MONTH 1 DATE 17 HOUR 2 MINUTE 0", alertSummaryStartTime="2016-09-26T08:00:00-07:00", alertSummaryInterval=weekly, pendingCoreCount="128" force

6.7.7.4 LIST DIAGPACK

Purpose

The LIST DIAGPACK command lists the diagnostic packages in your system, along with their status.

Syntax

LIST DIAGPACK [DETAIL]

Usage Notes

The location of the diagnostic packages is /opt/oracle/dbserver/dbms/deploy/log.

Examples

Example 6-57 Output of the "list diagpack" Command

This example shows the output of the LIST DIAGPACK command.

DBMCLI> LIST DIAGPACK
scaqaa04adm01_2016_06_07T12_28_23_17_1.tar.bz2
scaqaa04adm01_2016_04_11T12_51_05_16_1.tar.bz2

Example 6-58 Output of the "list diagpack" command with the DETAIL option

This example shows the output of the LIST DIAGPACK command with the DETAIL option.

DBMCLI> LIST DIAGPACK DETAIL
   name:                   scaqaa04adm01_2016_06_07T12_28_23_17_1.tar.bz2
   alertDescription:       "Hard disk of size 600GB in slot 5 failed"
   alertName:              17_1
   diagPackHostName:       scaqaa04adm01
   packStartTime:          2016-06-07T12:28:23-07:00

   name:                   scaqaa04adm01_2016_04_11T12_51_05_16_1.tar.bz2
   alertDescription:       "InfiniBand Port HCA-4:1 may require attention. State:Down, Physical State:Disabled."
   alertName:              16_1
   diagPackHostName:       scaqaa04adm01
   packStartTime:          2016-04-11T12:51:05-07:00

Related Topics

6.7.7.5 LIST IBPORT

Purpose

The LIST IBPORT command displays attributes for InfiniBand ports determined by the specified attributes and filters.

Syntax

LIST IBPORT  [ name |  attribute_filters ]  [attribute_list] [DETAIL]

Usage Notes

The list of attributes that can be displayed is shown in Example 6-33.

If the activeSlave attributes for both InfiniBand ports on a server are not listed, then active-active bonding is being used. If an activeSlave attribute is TRUE, then active-passive bonding is being used.

Examples

Example 6-59 shows the LIST command with the IBPORT object, and the corresponding output.

Example 6-59 Listing IBPORT Attributes

DBMCLI> LIST IBPORT
         HCA-1:1         Active
         HCA-1:2         Active

DBMCLI> LIST IBPORT DETAIL
         name:                   HCA-1:1
         activeSlave:            TRUE
         dataRate:               "40 Gbps"
         hcaFWVersion:           2.7.0
         id:                     0x00212800013e8c67
         lid:                    20
         linkDowned:             0
         linkIntegrityErrs:      0
         linkRecovers:           0
         physLinkState:          LinkUp
         portNumber:             1
         rcvConstraintErrs:      0
         rcvData:                84653709
         rcvErrs:                0
         rcvRemotePhysErrs:      0
         status:                 Active
         symbolErrs:             0
         vl15Dropped:            0
         xmtConstraintErrs:      0
         xmtData:                84572496
         xmtDiscards:            0

         name:                   HCA-1:2
         activeSlave:            FALSE
         dataRate:               "40 Gbps"
         hcaFWVersion:           2.7.0
         id:                     0x00212800013e8c68
         lid:                    21
         linkDowned:             0
         linkIntegrityErrs:      0
         linkRecovers:           0
         physLinkState:          LinkUp
         portNumber:             2
         rcvConstraintErrs:      0
         rcvData:                79355427
         rcvErrs:                0
         rcvRemotePhysErrs:      0
         status:                 Active
         symbolErrs:             0
         vl15Dropped:            0
         xmtConstraintErrs:      0
         xmtData:                79274016
         xmtDiscards:            0

6.7.7.6 LIST LUN

Purpose

The LIST LUN command displays attributes for LUNs determined by the specified attributes and filters.

Syntax

LIST LUN [ name |  attribute_filters ]  [attribute_list] [DETAIL]

Usage Notes

The list of attributes that can be displayed is shown in Example 6-34.

Examples

Example 6-60 shows the LIST command with the LUN object, and the corresponding output.

Example 6-60 Listing LUN Attributes

DBMCLI> LIST LUN
         0_0     0_0     normal
 
DBMCLI> LIST LUN 0_0 DETAIL
         name:                   0_0
         diskType:               HardDisk
         id:                     0_0
         lunSize:                556.9289999008179G
         lunUID:                 0_0
         raidLevel:              5
         lunWriteCacheMode:      "WriteBack, ReadAheadNone, Direct,   \
                                  No Write Cache if Bad BBU"
         status:                 normal

6.7.7.7 LIST METRICCURRENT

Purpose

The LIST METRICCURRENT command displays a list of collections of all metrics.

Syntax

LIST METRICCURRENT [ name |  attribute_filters ]  [attribute_list]  [DETAIL]

Usage Notes

  • The list of attributes that can be displayed is shown in Example 6-35.

  • To reduce the size of the output when you run the LIST METRICCURRENT command, use filters.

Examples

Example 6-61 shows the LIST command with filters to display information about the METRICCURRRENT object, and the corresponding output.

Example 6-61 Listing METRICCURRENT Attributes

DBMCLI> LIST METRICCURRENT attributes name, objecttype
         DS_BBU_CHARGE           DBSERVER
         DS_BBU_TEMP             DBSERVER
         DS_CPUT                 DBSERVER
         DS_CPUT_MS              DBSERVER
         DS_FANS                 DBSERVER
         DS_FSUT                 DBSERVER_FILESYSTEM
         DS_FSUT                 DBSERVER_FILESYSTEM
         DS_FSUT                 DBSERVER_FILESYSTEM
         DS_MEMUT                DBSERVER
         DS_MEMUT_MS             DBSERVER
         DS_RUNQ                 DBSERVER
         DS_SWAP_IN_BY_SEC       DBSERVER
         DS_SWAP_OUT_BY_SEC      DBSERVER
         DS_SWAP_USAGE           DBSERVER
         DS_TEMP                 DBSERVER
         DS_VIRTMEM_MS           DBSERVER
         N_HCA_MB_RCV_SEC        DBSERVER
         N_HCA_MB_TRANS_SEC      DBSERVER
         N_IB_MB_RCV_SEC         IBPORT
         N_IB_MB_RCV_SEC         IBPORT
         N_IB_MB_TRANS_SEC       IBPORT
         N_IB_MB_TRANS_SEC       IBPORT
         N_IB_UTIL_RCV           IBPORT
         N_IB_UTIL_RCV           IBPORT
         N_IB_UTIL_TRANS         IBPORT
         N_IB_UTIL_TRANS         IBPORT
         N_NIC_KB_RCV_SEC        DBSERVER
         N_NIC_KB_TRANS_SEC      DBSERVER
         N_NIC_NW                DBSERVER

DBMCLI> LIST METRICCURRENT where objectType='IBPORT'
         N_IB_MB_RCV_SEC         HCA-1:1         0.026 MB/sec
         N_IB_MB_RCV_SEC         HCA-1:2         0.009 MB/sec
         N_IB_MB_TRANS_SEC       HCA-1:1         0.021 MB/sec
         N_IB_MB_TRANS_SEC       HCA-1:2         0.004 MB/sec
         N_IB_UTIL_RCV           HCA-1:1         0.0 %
         N_IB_UTIL_RCV           HCA-1:2         0.0 %
         N_IB_UTIL_TRANS         HCA-1:1         0.0 %
         N_IB_UTIL_TRANS         HCA-1:2         0.0 %

DBMCLI> LIST METRICCURRENT where name = DS_CPUT and metricobjectname= myexadb04 detail
         name:                   DS_CPUT
         alertState:             normal
         collectionTime:         2014-03-13T16:15:25-05:00
         metricObjectName:       myexadb04
         metricType:             Instantaneous
         metricValue:            0.9 %
         objectType:             DBSERVER
 
 
DBMCLI> LIST METRICCURRENT DS_FSUT
         DS_FSUT         /       50 %
         DS_FSUT         /boot   18 %
         DS_FSUT         /u01    82 %

6.7.7.8 LIST METRICDEFINITION

Purpose

The LIST METRICDEFINITION command displays a list of metric definitions on the database server.

Syntax

LIST METRICDEFINITION [ name |  attribute_filters ]  [attribute_list]  [DETAIL]

Usage Notes

The list of attributes that can be displayed is shown in Example 6-36.

Examples

Example 6-62 shows the LIST command with the METRICDEFINITION object, and the corresponding output.

Example 6-62 Listing METRICDEFINITION Attributes

DBMCLI> LIST METRICDEFINITION
         DS_BBU_CHARGE
         DS_BBU_TEMP
         DS_CPUT
         DS_CPUT_MS
         DS_FANS
         DS_FSUT
         DS_MEMUT
         DS_MEMUT_MS
         DS_RUNQ
         DS_SWAP_IN_BY_SEC
         DS_SWAP_OUT_BY_SEC
         DS_SWAP_USAGE
         DS_TEMP
         DS_VIRTMEM_MS
         N_HCA_MB_RCV_SEC
         N_HCA_MB_TRANS_SEC
         N_IB_MB_RCV_SEC
         N_IB_MB_TRANS_SEC
         N_IB_UTIL_RCV
         N_IB_UTIL_TRANS
         N_NIC_KB_RCV_SEC
         N_NIC_KB_TRANS_SEC
         N_NIC_NW

6.7.7.9 LIST METRICHISTORY

Purpose

The LIST METRICHISTORY command displays a list of individual metrics.

Syntax

LIST METRICHISTORY [ name |  attribute_filters ]  [attribute_list]  
                   {over_specification] [MEMORY] [DETAIL]

Usage Notes

  • The list of attributes that can be displayed is shown in Example 6-37.

  • The retention period for metric history entry files is specified by the metricHistoryDays database server attribute. You can modify this setting with the DBMCLI ALTER DBSERVER command.

  • The over_specification syntax is as follows:

    OVER number [aggregation_type [aggregation_type]...] 
    

    In the preceding syntax, number is amount of time in minutes for the aggregation, and aggregation_type can be max, min, or avg.

  • A WHERE clause can include the ageInMinutes attribute to specify the list is limited to those metrics which have the specified age. For example, the following command would show the metrics created in the previous 15 minutes:

    DBMCLI> LIST METRICHISTORY WHERE ageInMinutes < 15
    

Examples

Example 6-63 shows the LIST METRICHISTORY command with the name and collectionTime attributes.

Example 6-64 shows the LIST METRICHISTORY command with the ds_cput attribute.

Example 6-63 Listing METRICHISTORY Using the Name and CollectionTime Attributes

DBMCLI> LIST METRICHISTORY WHERE name LIKE 'DS_.*' AND collectionTime > '2014-03-27T17:48:16-05:00'

         DS_FANS                 myexadb03       16              2014-03-27T17:49:15-05:00
         DS_TEMP                 myexadb03       20.0 C          2014-03-27T17:49:15-05:00
         DS_BBU_CHARGE           myexadb03       52.0 %          2014-03-27T17:49:16-05:00
         DS_BBU_TEMP             myexadb03       45.0 C          2014-03-27T17:49:16-05:00
         DS_CPUT                 myexadb03       0.3 %           2014-03-27T17:49:16-05:00
         DS_CPUT_MS              myexadb03       0.0 %           2014-03-27T17:49:16-05:00
         DS_FSUT                 /               73 %            2014-03-27T17:49:16-05:00
         DS_FSUT                 /boot           18 %            2014-03-27T17:49:16-05:00
         DS_FSUT                 /u01            43 %            2014-03-27T17:49:16-05:00
         DS_MEMUT                myexadb03       42 %            2014-03-27T17:49:16-05:00
         DS_MEMUT_MS             myexadb03       0.3 %           2014-03-27T17:49:16-05:00
         DS_MEMUT_MS             myexadb03       0.3 %           2014-03-27T17:49:16-05:00
         DS_RUNQ                 myexadb03       0.2             2014-03-27T17:49:16-05:00
         DS_SWAP_IN_BY_SEC       myexadb03       0.0 KB/sec      2014-03-27T17:49:16-05:00
         DS_SWAP_OUT_BY_SEC      myexadb03       0.0 KB/sec      2014-03-27T17:49:16-05:00
         DS_SWAP_USAGE           myexadb03       0 %             2014-03-27T17:49:16-05:00
         DS_VIRTMEM_MS           myexadb03       981 MB          2014-03-27T17:49:16-05:00
         DS_VIRTMEM_MS           myexadb03       981 MB          2014-03-27T17:49:16-05:00

Example 6-64 Listing METRICHISTORY for the ds_cput Attribute

DBMCLI> LIST METRICHISTORY ds_cput OVER 10 MIN MAX MEMORY
         DS_CPUT  myexadb03  1.0 %   2014-03-27T16:59:16-05:00       0.3 %   1.0 %
         DS_CPUT  myexadb03  0.7 %   2014-03-27T17:09:16-05:00       0.2 %   0.8 %
         DS_CPUT  myexadb03  0.7 %   2014-03-27T17:19:16-05:00       0.3 %   1.1 %
         DS_CPUT  myexadb03  0.7 %   2014-03-27T17:29:16-05:00       0.3 %   0.9 %
         DS_CPUT  myexadb03  0.7 %   2014-03-27T17:39:16-05:00       0.2 %   0.8 %
         DS_CPUT  myexadb03  0.8 %   2014-03-27T17:49:16-05:00       0.3 %   0.8 %

See Also:

6.7.7.10 LIST PHYSICALDISK

Purpose

The LIST PHYSICALDISK command displays attributes for one or more physical disks determined by the specified attributes and filters.

Syntax

LIST PHYSICALDISK [ name |  attribute_filters ]  [attribute_list]  [DETAIL]

Usage Notes

The list of attributes that can be displayed is shown in Example 6-38.

Examples

Example 6-65 shows the LIST command with the PHYSICALDISK object, and the corresponding output.

Example 6-65 Listing Physical Disk Attributes

DBMCLI> LIST PHYSICALDISK
         252:0   G08VKE  normal
         252:1   GYVAXE  normal
         252:2   G07Z5E  normal
         252:3   G0889E  normal

6.7.7.11 LIST ROLE

Purpose

The LIST ROLE command displays the specified attributes for a role.

Syntax

LIST ROLE [name | filters] [attribute_list] [DETAIL] 

Usage Notes

  • name is the name of the role.

  • filters is an expression that determines which roles are displayed.

  • attribute_list is the attributes to display. The ALL option can be used to display all attributes.

  • The DETAIL option formats the output as an attribute on each line, with an attribute descriptor preceding each value.

Examples

Example 6-66 shows the LIST ROLE command.

Example 6-66 Displaying a Role

DBMCLI> LIST ROLE DETAIL

DBMCLI> LIST ROLE where name like 'db_*'

6.7.7.12 LIST THRESHOLD

Purpose

The LIST THRESHOLD command displays attributes for one or more thresholds determined by the specified attributes and filters.

Syntax

LIST THRESHOLD [ name |  attribute_filters ]  [attribute_list] [DETAIL]

Usage Notes

The list of attributes that can be displayed is shown in Example 6-40.

Examples

Example 6-67 shows the LIST command with the THRESHOLD object, and the corresponding output.

Example 6-67 Listing Threshold Attributes

DBMCLI> LIST THRESHOLD                                               
         DS_CPUT.myexadb04
         DS_TEMP.myexadb04
 
DBMCLI> LIST THRESHOLD DS_CPUT.myexadb04 detail
         name:                   DS_CPUT.myexadb04
         comparison:             >
         warning:                90.0
 
DBMCLI> LIST THRESHOLD DS_TEMP.myexadb04 detail
         name:                   DS_TEMP.myexadb04
         comparison:             >
         critical:               30.0

6.7.7.13 LIST USER

Purpose

The LIST USER command displays the specified attributes for a user.

Syntax

LIST USER [name | filters] [attribute_list] [DETAIL] 

Usage Notes

  • name is the user name.

  • filters is an expression that determines which users are displayed.

  • attribute_list is the attributes to display. The ALL option can be used to display all attributes.

  • The DETAIL option formats the output as an attribute on each line, with an attribute descriptor preceding each value.

Examples

Example 6-68 shows the LIST USER command.

Example 6-68 Using the LIST USER Command

DBMCLI> LIST USER DETAIL

DBMCLI> LIST USER where name like 'jdoe' DETAIL
         name:                   jdoe
         roles:                  role=db_monitor
         Privileges:             object=dbserver 
                                 verb=list
                                 attributes=all attributes
                                 options= all options

6.7.8 REVOKE

Purpose

The REVOKE command removes privileges and roles.

Syntax

REVOKE object_type [name] FROM sub_object_type [sub_object_name]

Usage Notes

  • object_type can be as follows:

    • PRIVILEGE

    • ROLE

  • The following can be used for PRIVILEGE object type:

    • name is in the following format:

      { ALL ACTIONS | action } ON { ALL OBJECTS | object }  { ALL ATTRIBUTES | \
      ATTRIBUTES attribute1 [, attribute2, ...] }  { WITH ALL OPTIONS |        \
      WITH OPTIONS option1 [, option2, ...] }
      
    • The sub_object_type must be ROLE.

    • The sub_object_name is a role name, a comma-delimited list of role names, or the keyword ALL.

  • The following can be used for the ROLE object type:

    • name is a role name, a comma-delimited list of role names, or the keyword ALL.

    • The sub_object_type must be USER.

    • The sub_object_name is the name of the user, a comma-delimited list of user names, or the keyword ALL.

6.7.8.1 REVOKE PRIVILEGE

Purpose

The REVOKE PRIVILEGE command revokes privileges from a role.

Syntax

REVOKE PRIVILEGE { ALL ACTIONS | action } ON { ALL OBJECTS | object } { ALL ATTRIBUTES | ATTRIBUTES attribute1 [, attribute2...] } { WITH ALL OPTIONS | WITH OPTIONS option1 [, option2, ...] } FROM ROLE { ALL | role1 [, role2, ...] }

Usage Notes

  • action is the command.

  • object is object type for the action.

  • attribute are the attributes for the object.

  • option are the options for the object.

  • role is the name of the role from which to revoke privileges.

  • The ALL ACTIONS argument revokes privileges for all actions.

  • The ALL OBJECTS argument revokes privileges for all objects.

  • The ALL ATTRIBUTES argument revokes privileges for all attributes.

  • The WITH ALL OPTIONS argument revokes privileges for all options.

Examples

Example 6-69 shows the REVOKE PRIVILEGE command.

Example 6-69 Revoking a Privilege

DBMCLI> REVOKE PRIVILEGE ALL ACTIONS ON ALL OBJECTS ALL ATTRIBUTES -
         WITH ALL OPTIONS FROM ROLE ALL

DBMCLI> REVOKE PRIVILEGE list ON dbserver ATTRIBUTES name     -
         WITH OPTIONS detail FROM ROLE db_monitor

6.7.8.2 REVOKE ROLE

Purpose

The REVOKE ROLE command revokes the role for a user.

Syntax

REVOKE ROLE { ALL | role1 [, role2, ...] } FROM USER { ALL | user1 [, user2...] }

Usage Notes

  • role1 and role2 are the names of roles.

  • user1 and user2 are the names of users.

  • The ALL argument revokes all roles from the user.

  • The FROM USER ALL argument revokes the role from all users.

Examples

Example 6-70 shows how to revoke a role from a user.

Example 6-70 Revoking a Role From a User

DBMCLI> REVOKE ROLE db_monitor FROM USER jdoe 

6.7.9 SET

Purpose

The SET command sets a variable to alter the DBMCLI environment settings for the current session.

Syntax

SET DATEFORMAT {LOCAL | STANDARD}
SET ECHO [ON | OFF]

Usage Notes

The SET DATEFORMAT command controls the format of displayed dates. For commands that accept dates, the standard date-time format is recommended. The local format is also accepted. The standard format is recommended for scripts because that format is less sensitive to the time zone, region, and locale changes that might occur when running a script.

The SET ECHO command controls whether to echo commands in a script that is run with @ or START. The ON option displays the commands on screen. The OFF option suppresses the display. The SET ECHO command does not affect the display of commands entered interactively or redirected from the operating system.

Example 6-71 Setting the Date Format with the SET Command

SET DATEFORMAT STANDARD

6.7.10 SPOOL

Purpose

The SPOOL command writes (spools) the results of commands to the specified file.

Syntax

SPO[OL] [file_name [ CRE[ATE] | REP[LACE] | APP[END] ] | OFF]

Usage Notes

If you issue SPOOL file_name with no option, then the output is spooled to that file whether or not the file already exists. The REPLACE option is the default behavior.

Table 6-16 SPOOL Options

Option Description

APPEND

Adds the results to the end of the file specified.

CREATE

Creates a new file with the name specified, and raises an error if the file exists.

file_name

Names the file to which the results are written. It can be specified with a fully-qualified path name, or with a partially-qualified path name relative to the current directory.

no option

Displays the name of the current spool target file, if any.

OFF

Stops writing (spooling) output to the file.

REPLACE

Replaces the contents of an existing specified file. If the file does not exist, then REPLACE creates the file. This is the default behavior.

6.7.11 START

Purpose

The START command runs the DBMCLI commands in the specified script file.

Syntax

STA[RT] file_name

Usage Notes

The START option is file_name. It is the name of the script file that contains the DBMCLI commands. If the file name does not include a fully-qualified path, then the DBMCLI utility searches for the file relative to the current directory.

The START command is useful when entering long or multiple DBMCLI commands. For example, all the commands in Example 6-9 can be entered in a text file named alter_dbserver, then run as follows, assuming that the alter_dbserver file is in the current directory:

START alter_dbserver