Thursday, April 5, 2007

To connect to the target database you have to set at least the ORACLE_SID variable for your Unix environment.Moreover you can connect to the target database using RMAN only if you have the SYSDBA privilege granted, otherwise an error message will be showed:

As usual two methods are used to have the SYSDBA privilege, via local OS authentication or via remote password file.We will use our local OS authentication so RMAN enables you to automatically connects to the target database with the SYSDBA privilege.

To connect to a target database using O/S authentication, use the following command:

As RMAN says you are using the target database controlfile instead of a recovery catalog database.nocatalog is the default option, so the following command will connect again to the target database controlfile:

To connect to a target database using O/S authentication and to a remote recovery catalog database, use the following command:

$ rman target / catalog rmadmin/rmadmin@catdb

In a production environment your connection to the catalog usually should be through a network connection and should never reside on the same host as your target database, otherwise you could have a single point of failure and lost at the same time your target database and the information to recover it, saved in your recovery catalog database.

A good practice is to use the connect commands from within RMAN when you connect to remote target or recovery catalog database.In this way you prevent other users to view the passwords from appearing in the process list, for example instead of use the following command: