RMAN: While Connected to the Root Container

RMAN: While Connected to the Root Container
Andrey Volkov

Andrey Volkov

System, network administration + DBA. And a little programmer!)) See Author profile.

Suppose you’re connected to the root container as SYS and want to back up all data files (including any data files with associated pluggable databases). First, verify that you are indeed connected to the root container as SYS:

RMAN> SELECT SYS_CONTEXT('USERENV', 'CON_ID')   AS con_id,

       SYS_CONTEXT('USERENV', 'CON_NAME')       AS cur_container,

       SYS_CONTEXT('USERENV', 'CURRENT_SCHEMA') AS cur_user

       FROM DUAL;

Here is some sample output:

CON_ID               CUR_CONTAINER        CUR_USER

-------------------- -------------------- --------------------

1                    CDB$ROOT             SYS

Now, to back up all data files, both in the root container and in any associated pluggable databases, do so as follows:

RMAN> backup database;

If you want to back up only the data files associated with the root container, then specify ROOT:

RMAN> backup database root;

You can also back up a specific pluggable database:

RMAN> backup pluggable database salespdb;

Additionally, you can back up specific tablespaces within a pluggable database:

RMAN> backup tablespace SALESPDB:SALES;

And, you can specify the file name to back up any data file within the root container or associated pluggable databases:

RMAN> backup datafile '/ora01/app/oracle/oradata/CDB/salespdb/sales01.dbf';

Вас заинтересует / Intresting for you:

RMAN: Using Online or Offline ...
RMAN: Using Online or Offline ... 821 views Андрей Волков Sat, 29 Feb 2020, 10:01:33
RMAN: Specifying the Backup Us...
RMAN: Specifying the Backup Us... 1470 views Андрей Волков Sat, 29 Feb 2020, 10:14:03
RMAN: Checking for Corruption ...
RMAN: Checking for Corruption ... 162 views Андрей Волков Thu, 30 Sep 2021, 11:57:27
RMAN: Backing UP Oracle Databa...
RMAN: Backing UP Oracle Databa... 113 views Андрей Волков Wed, 29 Sep 2021, 18:27:51
Log in to comment