• Nenhum resultado encontrado

Configuring Database Control After Installation Using EMCA

No documento Oracle® Real Application Clusters (páginas 84-88)

New Features for Release 1(11.1)

6.2 Configuring Database Control During and After Installation

6.2.4 Configuring Database Control After Installation Using EMCA

When you use DBCA to configure Oracle RAC 11g release 2 (11.2), DBCA provides a graphical user interface to help you select Database Control options and to configure other aspects of your database.

However, if you want to use the operating system command line to configure Database Control, you can use the Enterprise Manager Configuration Assistant (EMCA).

To configure Database Control with EMCA:

1. Set the ORACLE_HOME environment variable to identify the Oracle home for the database you want to manage:

2. Change directory to the ORACLE_HOME/bin directory.

3. Start EMCA by entering the following command with any of the optional command-line arguments shown in Table 6–1:

$ ./emca

Depending upon the arguments you include on the EMCA command line, EMCA prompts you for the information required to configure Database Control.

For example, enter the following command to configure Database Control so it will perform automatic daily backups of your database:

$ ./emca -config dbcontrol db -backup

EMCA commands are of the form:

emca [operation] [mode] [flags] [parameters]

Table 6–1 describes the valid execution operations and modes, and lists the optional parameters in brackets. Table 6–2 discusses the flags and their behavior, while

Table 6–3 defines the optional parameters in detail. EMCA parameters are of the form [-parameterName parameterValue]. Multiple parameters can be used in combination at the command line.

Caution: During configuration of Database Control using EMCA, the database may become unavailable, and users may not be able to connect to the database or perform operations on the database.

Note: To configure Database Console for single instance database using Oracle ASM, no extra parameters need to be passed along with the EMCA command. Run the following command to configure the Database Console which will automatically detect the Oracle ASM instance:

emca -config dbcontrol db -repos create

Table 6–1 EMCA Command-Line Operations

Command Description

emca -h | --h | -help | --help Use this option to display the Help message for the EMCA utility. The options described in Table 6–1, Table 6–2, andTable 6–3, and the valid parameters you may include are

Configuring Database Control During and After Installation

Configuring Server Pools and Enterprise Manager Database Control 6-7 emca –version Prints the version information associated with EMCA.

emca -config dbcontrol db [-repos (create | recreate)]

[-cluster] [-silent] [-backup]

[parameters]

Configures Database Control for a database. Options include creating (or recreating) Database Control repository,

configuring automatic backups, and performing these operations on a cluster database.

emca -config centralAgent (db | asm) [-cluster] [-silent]

[parameters]

Configures central agent management for a database or an Automatic Storage Management (ASM) instance. Options include performing this operation on a cluster

environment.This operation will configure the database so that it can be centrally managed by the Oracle Enterprise Manager 10g Grid Control Console. To use this option, you must have previously installed the Oracle Management Service component of Enterprise Manager on a network host. In addition, the Oracle Management Agent must be installed on the host where you are running the database.

emca -config all db [-repos (create | recreate)] [-cluster]

[-silent] [-backup]

[parameters]

Configures both Database Control and central agent

management for a database. The possible configuration options are similar to those described above.

emca -deconfig dbcontrol db [-repos drop] [-cluster]

[-silent] [parameters]

Deconfigures Database Control for a database. Options include dropping the Database Control repository and performing these operations on a cluster database. For example, you might use this command to remove the Database Control

configuration from a database you are planning to delete. In such a scenario, remove the Database Control configuration before physically deleting the database. This operation does not remove the actual database or its data files.

emca -deconfig centralAgent (db | asm) [-cluster] [-silent]

[parameters]

Deconfigures central agent management for a database or an Oracle ASM instance. Options include performing this operation on a cluster environment. For example, you might use this command to remove the central agent management configuration from a database you are planning to delete. In such a scenario, remove the central agent management configuration before physically deleting the database. This operation does not remove the actual database or its data files.

emca -deconfig all db [-repos drop] [-cluster] [-silent]

[parameters]

Deconfigures both Database Control and central agent management for a database. The possible deconfiguration options are similar to those described above.

emca -addNode (db | asm) [-silent] [parameters]

Configures Enterprise Manager for a new cluster instance of a database or ASM storage.

For more information, refer to "Understanding Using EMCA with Oracle RAC" on page 6-2.

emca -deleteNode (db | asm) [-silent] [parameters]

Deconfigures Enterprise Manager for a node getting deleted.

This is discussed further below, in "Understanding Using EMCA with Oracle RAC". For more information, refer to

"Understanding Using EMCA with Oracle RAC" on page 6-2.

emca -addInst (db | asm) [-silent] [parameters]

Configures Enterprise Manager for a new cluster instance of a database or Oracle ASM storage. For more information, refer to

"Understanding Using EMCA with Oracle RAC" on page 6-2.

emca -deleteInst (db | asm) [-silent] [parameters]

Deconfigures Enterprise Manager for a specific instance of a cluster database or Oracle ASM storage. This is discussed further below, in "Understanding Using EMCA with Oracle RAC" on page 6-2.

Table 6–1 (Cont.) EMCA Command-Line Operations

Command Description

Configuring Database Control During and After Installation

emca -reconfig ports [-cluster]

[parameters]

Explicitly reassigns Database Control ports. Options include performing this operation on a cluster environment. For more information, refer to "Specifying the Ports Used By the Database Control" on page 6-11.

emca -reconfig dbcontrol -cluster [-silent] [parameters]

Reconfigures Database Control deployment for a cluster database. Note that this command must be used with the

"-cluster" option. For more information, refer to

"Understanding Using EMCA with Oracle RAC" on page 6-2.

emca -displayConfig dbcontrol -cluster [-silent]

[parameters]

Displays information about the current deployment configuration of Database Control in a cluster environment.

Note that this command must be used with the "-cluster"

option. For more information, refer to "Understanding Using EMCA with Oracle RAC" on page 6-2.

emca -upgrade (db | asm | db_asm) [-cluster] [-silent]

[parameters]

Upgrades the configuration of an earlier version of Enterprise Manager to the current version. This operation can be performed for database, Oracle ASM, or database and Oracle ASM instances together simultaneously. This does not upgrade the actual database or Oracle ASM instances, nor does it upgrade the Enterprise Manager software. Instead, it upgrades the configuration files for the specified instance so that they are compatible with the current version of the Enterprise Manager software. EMCA will attempt to upgrade all instances of the specified database and/or Oracle ASM target on the host, across all Oracle Homes (since it is likely that certain target properties, such as listener port or Oracle Home, have changed).

emca -restore (db | asm | db_

asm) [-cluster] [-silent]

[parameters]

Restores the current version of Enterprise Manager

configuration to an earlier version. This is the inverse of the

"-upgrade" option (and will reverse any changes that result from an "-upgrade" operation), and as such, the options are similar.

Table 6–2 EMCA Command-Line Flags

Flag Description

db Performs the operation for a database (including cluster databases). Use this option for databases that use Automatic Storage Management (ASM) to store the data files. If a database is using Oracle ASM, all the configuration operations and modes described above (except for "-upgrade" and "-restore") will detect this automatically and apply the changes to both the database and Oracle ASM instance(s).

asm Performs the operation for an Oracle ASM-only instance (including cluster Oracle ASM instances).

db_asm This flag can only be used in "-upgrade" and "-restore" mode.

Performs the upgrade/restore operation for a database and an Oracle ASM instance together. Database and Oracle ASM instances may be upgraded or restored separately (that is, upgrading an Oracle ASM instance does not require upgrading the database instances it services). Hence, the Enterprise Manager configuration can be upgraded or restored separately for a database and its respective Oracle ASM instance.

-repos create Creates a new Database Control management repository.

-repos drop Drops the current Database Control management repository.

Table 6–1 (Cont.) EMCA Command-Line Operations

Command Description

Configuring Database Control During and After Installation

Configuring Server Pools and Enterprise Manager Database Control 6-9 -repos recreate Drops the current Database Control management repository and

then recreates a new one.

-cluster Performs the operation for a cluster database or Oracle ASM instance.

-silent Performs the operation without prompting for additional information. If this mode is specified, all the required

parameters must be entered at the command line or specified in an input file using the –respFile argument. You can view a list of the available parameters by entering emca -help at the command line.

-backup Configures automatic backup for a database. EMCA will prompt for daily automatic backup options. The default Enterprise Manager settings will be used to backup the database files.

Note: If you use this option, EMCA will use the value of the db_

recovery_file_dest initialization parameter to identify the flashback recovery area for the automated backups. If that parameter is not set, EMCA will generate an error. You can modify these settings later using the Maintenance page in Database Control. For more information, see the Database Control online Help.

Table 6–3 EMCA Command-Line Parameters

Parameter Description

-respFile Specifies the path of an input file listing parameters for EMCA to use while performing its configuration operation.

-SID Database system identifier

-PORT Port number for the listener servicing the database -ORACLE_HOME Database Oracle Home, as an absolute path

-LISTENER_OH Oracle Home from where the listener is running. If the listener is running from an Oracle Home other than the one on which the database is running, the parameter LISTENER_OH must be specified.

-HOST_USER Host machine user name (for automatic backup) -HOST_USER_PWD Host machine user password (for automatic backup)

-BACKUP_SCHEDULE Schedule in the form of "HH:MM" (for daily automatic backups) -EMAIL_ADDRESS E-mail address for notifications

-MAIL_SERVER_NAME Outgoing Mail (SMTP) server for notifications -ASM_OH Automatic Storage Management Oracle Home -ASM_SID System identifier for Oracle ASM instance

-ASM_PORT Port number for the listener servicing the Oracle ASM instance -ASM_USER_ROLE User role for connecting to the Oracle ASM instance

-ASM_USER_NAME User name for connecting to the Oracle ASM instance -ASM_USER_PWD Password for connecting to the Oracle ASM instance

-DBSNMP_PWD Password for DBSNMP user

-SYSMAN_PWD Password for SYSMAN user

Table 6–2 (Cont.) EMCA Command-Line Flags

Flag Description

Configuring Database Control During and After Installation

No documento Oracle® Real Application Clusters (páginas 84-88)