Oracle RMAN 11g Backup and Recovery (30 page)

BOOK: Oracle RMAN 11g Backup and Recovery
8.94Mb size Format: txt, pdf, ePub

36
Part I: Getting Started with RMAN in Oracle Database 11
g
If you are logged in as a user who does not have dba group membership and you will need to use RMAN, then you must create and use a password file for your target database. If you will be connecting RMAN from a client system across the network, you need to create and use a password file. The configuration steps for this can be found in Chapter 3.

The Network Topology of RMAN Backups

The client/server architecture of RMAN inevitably leads to hours of confusion. This confusion typically comes from where RMAN is being executed, versus where the backup work is actually being done. RMAN is a client application that attaches to the target database via an Oracle Net connection. If you are running the RMAN executable in the same ORACLE_HOME as your target database, then this Oracle Net connection can be a bequeath, or local, connection and won’t require you to provide an Oracle Net alias—so long as you have the appropriate ORACLE_SID variable set in your environment. Otherwise, you will need to configure your tnsnames.ora file with an entry for your target database, and you will need to do this from the location where you will be running RMAN. Figure 2-1 provides an illustration of the network topology of different RMAN locations.

Running RMAN Remotely

If you are responsible for many databases spread over the enterprise, one option is to consolidate your RMAN application at a single client system, where you can better manage your tnsnames.ora entries. All your RMAN scripts can be consolidated, and you have no confusion later on where RMAN is running. You know exactly where it is running: on your laptop, your desktop, or your Linux workstation. This client/server model makes sense, as well, if you will be using a recovery catalog in your RMAN configuration, as you will be making more than one Oracle Net connection each time you operate RMAN. On the other hand, running RMAN from a different system (or even from a different ORACLE_HOME) than the target database means you will be required to set up a password file, leading to more configuration and management at each of your target databases.

FIGURE 2-1
Five different locations (and versions) for the RMAN executable

Chapter 2: Introduction to the RMAN Architecture
37

Who Uses a Recovery Catalog?

A recovery catalog is a repository for RMAN’s backup history, with metadata about when the backups were taken, what was backed up, and how big the backups are. It includes crucial information about these backups that is necessary for recovery. This metadata is extracted from the default location, the target database control file, and held in database tables within a user’s schema. Do you need a recovery catalog? Not really—only stored scripts functionality actually requires the catalog. If you end up configuring a more complex environment with standby configurations (Chapter 20), or sync/split configurations (Chapter 22), you will need one. Does a recovery catalog come in handy? Usually. Does a recovery catalog add a layer of complexity? Indubitably. Chapter 3, which discusses the creation and setup of a recovery catalog, goes into greater depth about why you should or should not use a recovery catalog.

We provide a discussion of the recovery catalog architecture later in this chapter.

If you will be making a remote connection from RMAN to the target database, you need to create a tnsnames.ora entry that can connect you to the target database with a dedicated server process. RMAN cannot use Shared Servers (formerly known as Multi-Threaded Servers, or MTS) to make a database connection. So if you use Shared Servers, which is the default setup on all new installations, then you need to create a separate Oracle Net alias that uses a dedicated server process. The difference between the two can be seen in the following sample tsnames.ora file.

Note that the first alias entry is for dedicated server processes, and the second uses the Shared Servers architecture.

PROD RMAN

(DESCRIPTION

(ADDRESS LIST

(ADDRESS (PROTOCOL TCP)(HOST cervantes)(PORT 1521))

)

(CONNECT DATA

(SERVER = DEDICATED)

(SERVICE NAME prod)

)

)

PROD

(DESCRIPTION

(ADDRESS LIST

(ADDRESS (PROTOCOL TCP)(HOST cervantes)(PORT 1521))

)

(CONNECT DATA

(SERVER = SHARED)

(SERVICE NAME prod)

)

)

Running RMAN Locally from the Target Database’s

ORACLE_HOME

In our opinion, running RMAN locally from each target database is the best way to manage a large enterprise with hundreds (or thousands) of database targets. Because of RMAN’s legendary compatibility headaches, keeping the rman.exe bundled tightly to the target database will save

Other books

Echo by Alyson Noël
Spy Story by Len Deighton
Out of the Blue by Mandel, Sally
The Taming of Lilah May by Vanessa Curtis
Jack by Daudet, Alphonse
Bunker by Andrea Maria Schenkel
Perfectly Kissed by Lacey Silks
Family Betrayal by Kitty Neale
They Spread Their Wings by Alastair Goodrum
She Poured Out Her Heart by Jean Thompson