Oracle RMAN 11g Backup and Recovery (112 page)

314
Part III: Using RMAN Effectively

Target database server

Database Control

Oracle Management

Service (OMS)

Agent

Database Control

repository

HTTP server

Target database

PC client

FIGURE 13-4
Database Control architecture

Of importance in this diagram is that the Database Control repository is located in the target database that it monitors. So, if the target database is down, Database Control cannot function except to start and stop the database and perform recovery. On a Windows system, the Database Control process is monolithic, and starts and stops as a single service from the Services control panel. On Linux and Unix, you stop and start dbconsole as a single application, but it still spawns separate agent and Java processes.

Database Control is not a separate install from the RDBMS installation. It runs from the same ORACLE_HOME that its target database runs from. Specifically, when dbconsole has been configured for a database, a new subdirectory in the ORACLE_HOME is created with the name
host
_
sid,
where
host
is the computer name and
sid
is the SID of the instance being monitored. For instance, if the server is named horatio.hadba.com, and we are monitoring the database that is named v112, then the configuration files would all be located in $ORACLE_HOMEhoratio.hadba.com_v112.

In a RAC environment, there are always multiple directories named for every node in the cluster, suffixed by the globalname for the RAC database. So, if you have a two-node RAC cluster on nodes dex and horatio, and the database is v112c, then there would be two directories on each node’s RDBMS home: ORACLE_HOME/dex_v112c and $ORACLE_HOME/horatio_v112c.

On each node, only the directory that corresponds in name to that node would actually have any files in it. The other would be empty. This convention is used in cases where the RAC cluster shares the same $ORACLE_HOME software tree on a shared drive.

Stopping and starting Database Control requires a simple command from the target database $ORACLE_HOME/bin directory:

Chapter 13: Using Oracle Enterprise Manager for Backup and Recovery
315

emctl start dbconsole

emctl stop dbconsole

Installing and Configuring Database Control

There is no specific installation of Database Control software required. It is installed by default with every version 10.2 (and higher) RDBMS installation that you already have. In fact, you may already have Database Control up and running on your computer right now, if you had the Universal Installer provide you with a starter database at the time of install. At that time, you would have been asked by the Installer how you wanted to manage your database, and one of the choices is Database Control.

Using the Database Configuration Assistant to Configure Database Control
Oracle provides a GUI utility to help you build databases, long referred to as the Database Configuration Assistant (DBCA). This is started by using the executable
dbca
out of the $ORACLE_

HOME/bin directory; thus, we refer to it hereafter as lowercase
dbca.

You can put
dbca
to good use for all kinds of purposes—for example, building a new database, deleting an old database, and installing database options. You can also use it to add Database Control functionality to your database. You can use
dbca
to add Database Control to a new database at the time you build it, or you can use
dbca
to modify an existing database. This is by far the simplest and most straightforward of all ways to get Database Control up and running.

The
dbca
executable cannot be used to remove or modify Database Control after it has been added. It is an addition tool only; for subtraction, you have to use the command-line tool
emca
(described next).

Notice in the next illustration the option to specify whether a backup will be scheduled automatically, with the Enable Daily Disk Backup to Recovery Area check box. This option enables the Oracle-suggested backup strategy, which we describe later in the chapter in the section “Oracle-Suggested Backup Strategy.” This is an out-of-the box backup strategy. You can also configure this with
emca
.

316
Part III: Using RMAN Effectively

Using Enterprise Manager Configuration Assistant to

Configure Database Control

Sometimes, as with all things Oracle, the GUI will simply prove to be too obtuse, too rigid, or too mystifying to serve your purposes when configuring Database Control. In these cases, you can use the command-line utility called Enterprise Manager Configuration Assistant (EMCA), run using the
emca
executable in the $ORACLE_HOME/bin directory of the RDBMS installation (again, we use the lowercase convention
emca
for this utility).

Unlike
dbca
,
emca
is not what you would call intuitive to use. But it offers all kinds of tweaks and switches that make it powerful and more easily debugged than the GUI
dbca
. Besides which, it’s always nice to avoid an X window when you don’t really need one. Because of this,
emca
is a valuable tool to look at. All the switches and controls are best described in the Oracle documentation; from our perspective, only a few are worth noting. These are the switches we use to identify the database we want to configure Database Control for, and to specify whether we want a default backup strategy put into place:

emca –config dbcontrol db –repos create –backup

emca –deconfig dbcontrol db –repos drop

When you fire off a command,
emca
prompts you in an interactive mode for information about what database SID you will be configuring (or deconfiguring), the listener port for the listener that will connect
emca
to the database, and for the required user passwords. Note that if you use the
–backup
switch,
emca
will prompt for backup configuration settings.

RMAN Workshop:
Configure Database Control Using emca

Workshop Notes

This workshop assumes an operational 10.2.0.1.0 database, named v102, running on Linux. This workshop details how to configure a default Database Control application for this database by using the command-line utility
emca
.

Step 1.
Use
emca
to drop an existing dbcontrol configuration and the dbcontrol repository:

[oracle@localhost dbhome 1]$ emca deconfig dbcontrol db repos drop

STARTED EMCA at Jun 11, 2009 3:03:30 PM

EM Configuration Assistant, Version 11.2.0.0.2 Production

Copyright (c) 2003, 2005, Oracle. All rights reserved.

Enter the following information:

Database SID: dev1

Listener port number: 1521

Password for SYS user:

Password for SYSMAN user:

Password for SYSMAN user:

Do you wish to continue? [yes(Y)/no(N)]: Y

Jun 11, 2009 3:03:52 PM oracle.sysman.emcp.EMConfig perform

INFO: This operation is being logged at

/home/oracle/app/oracle/cfgtoollogs/emca/dev1/emca 2009 06 11 15 03 30.log.

Jun 11, 2009 3:03:52 PM oracle.sysman.emcp.EMDBPreConfig performDeconfiguration WARNING: EM is not configured for this database. No EM specific actions can be performed.

Chapter 13: Using Oracle Enterprise Manager for Backup and Recovery
317

Jun 11, 2009 3:03:52 PM oracle.sysman.emcp.ParamsManager

checkListenerStatusForDBControl

WARNING: Error initializing SQL connection. SQL operations cannot be

performed

Jun 11, 2009 3:03:52 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Dropping the EM repository (this may take a while) ...

Jun 11, 2009 3:09:23 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Repository successfully dropped

Enterprise Manager configuration completed successfully

FINISHED EMCA at Jun 11, 2009 3:09:23 PM

Step 2.
Use
emca
to create a new dbcontrol configuration for this database. (Note that the following output is truncated in the middle; there are more steps executed by
emca
than shown here.)

Other books

Eerie by Jordan Crouch, Blake Crouch
Medieval Ever After by Kathryn Le Veque, Barbara Devlin, Keira Montclair, Emma Prince
Hush 2: Slow Burn by Blue Saffire
Broken Spell by Fabio Bueno
Batman 4 - Batman & Robin by Michael Jan Friedman
Dead Water by Barbara Hambly