904 Bedford St, New York NY 10014

(+1) 5184-453-1514

Starting RMAN – RMAN Backups and Reporting

There are several components and terms to understand; however, running the backup using RMAN is fairly straightforward. With this understanding, you have all of these options depending on your database. If you are maintaining a database that has 24/7 requirements, you need to be able to effectively back up and restore the database.

To connect to RMAN, you need to establish the following:

•     OS environment variables

•     Access to a privileged OS account or a database user with SYSBACKUP privileges

The easiest way to connect to RMAN is to log in to the server on which the target database resides as the owner of the Oracle software (usually named oracle, on Linux/ Unix boxes).

When you log in as oracle, you need to establish several OS variables before you can use utilities such as rman and sqlplus. Setting these required OS variables is covered in detail in Chapter 2.

RMAN can be run from another server with the Oracle software installed. The service or SID name is what is needed to connect to the target database to perform the backup.

At a minimum, you need to set ORACLE_HOME and ORACLE_SID. Additionally, it is convenient if the PATH variable includes the directory ORACLE_HOME/bin. This is the directory that contains the Oracle utilities.

After you have established your OS variables, you can invoke RMAN from the OS, as shown here:

Or shown here:

When connecting to RMAN, you do not have to specify the AS SYSDBA clause (as you do when connecting to a database as a privileged user in SQL*Plus).

This is because RMAN always requires that you connect as a database user with SYSDBA privileges. Any user will need to have the SYSBACKUP role granted to it in order to perform the backups.

The SYSBACKUP privilege allows you to assign privileges to a user that include only the permissions needed to perform backup and restore operations.

The SYSBACKUP privilege contains the subset of SYSDBA privileges required for carrying out such operations. SYSBACKUP is needed to perform backups.

The previous example of logging in to RMAN uses OS authentication. This type of authentication means that if you can log in to an authorized OS account (such as the owner of the Oracle software, usually oracle), then you are allowed to connect to the database without having to provide a username and password.

You administer OS authentication by assigning special groups to OS accounts. When you install the Oracle binaries in a Linux/Unix environment, you are required to specify at the time of installation the names of the OS groups that are assigned the database privileges of SYSDBA, SYSOPER, and SYSBACKUP—typically, the dba, oper, and backupdba groups, respectively (see Chapter 1 for details).

As part of an enterprise backup solution, it is recommended to create a separate user for backups to perform the backups to disk or tape and schedule to run automatically.

Note It is typical to be in a sQL*plus session and accidentally attempt an RMAN command or just try running RMAN from sQL*plus.Well, that does not work:

The reason is that the rman client is an Os utility, not a sQL*plus function.You must invoke the rman client from the Os prompt.

Search

Popular Posts

  • Recovery Catalog Versions – RMAN Backups and Reporting
    Recovery Catalog Versions – RMAN Backups and Reporting

    I recommend that you create a recovery catalog for each version of the target databases that you are backing up. Doing so will save you some headaches with compatibility issues and upgrades. I have found it easier to use a recovery catalog when the database version of the rman client is the same version used…

  • Registering a Target Database – RMAN Backups and Reporting
    Registering a Target Database – RMAN Backups and Reporting

    Now, you can register a target database with the recovery catalog. Log in to the target database server. Ensure that you can establish connectivity to the recovery catalog database. For instance, one approach is to populate the TNS_ADMIN/tnsnames.ora file with an entry that points to the remote database. On the target database server, register the…

  • Creating a Recovery Catalog – RMAN Backups and Reporting
    Creating a Recovery Catalog – RMAN Backups and Reporting

    When I use a recovery catalog, I prefer to have a dedicated database that is used only for the recovery catalog. This ensures that the recovery catalog is not affected by any maintenance or downtime required by another application (and vice versa). Listed next are the steps for creating a recovery catalog: 1. Create a…

Tags