Use RMAN CONNECT command to establish a connection between RMAN and a target, auxiliary, or recovery catalog database.
Connecting to a Target Database Without a Recovery Catalog
This example starts RMAN in NOCATALOG
mode and then connects to the target database with an Oracle Net service name prod1
. sbu
is a user who is granted the SYSBACKUP
privilege.
% rman NOCATALOG RMAN> CONNECT TARGET "[email protected] AS SYSBACKUP"; target database Password: password connected to target database: PROD1 (DBID=39525561)
Connecting to a Target Database in the Default NOCATALOG Mode
This example starts RMAN without specifying either CATALOG
or NOCATALOG
and then uses operating system authentication to connect to a target database with operating system authentication. Because no CONNECT CATALOG
command has been run, RMAN defaults to NOCATALOG
mode when you run the BACKUP
command.
% rman RMAN> CONNECT TARGET / RMAN> BACKUP DATABASE;
At this point in the RMAN session, you cannot run CONNECT CATALOG
because the session has defaulted to NOCATALOG
mode. An attempt to connect to the catalog in this session receives an error:
RMAN> CONNECT CATALOG [email protected] RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-06445: cannot connect to recovery catalog after NOCATALOG has been used
Connecting to Target, Recovery Catalog, and Auxiliary Databases
This example connects to a target database with operating system authentication and connects to the recovery catalog and auxiliary databases with password files. sbu
is a user who is granted the SYSBACKUP
privilege. RMAN prompts for the password.
% rman RMAN> CONNECT TARGET; connected to target database: PROD (DBID=39525561) RMAN> CONNECT CATALOG [email protected]; recovery catalog database Password: password connected to recovery catalog database RMAN> CONNECT AUXILIARY "[email protected] AS SYSBACKUP"; auxiliary database Password: password connected to auxiliary database: DUPDB (not mounted)
Connecting to the Root Using Operating System Authentication
This example connects to the root in a CDB using operating system authentication. By default, the connection is established using SYSDBA
privilege.
%rman RMAN> CONNECT TARGET /
Connecting to a PDB as a Local User
This example connects to the PDB hr_pdb
as the local user sbu_pdb
who is granted the SYSBACKUP
privilege on the hr_pdb
PDB. hrpdb
is the net service name corresponding to the PDB hr_pdb
.
%rman RMAN> CONNECT TARGET "[email protected] AS SYSBACKUP";
Also See: