RMAN: While Connected to the Root Container

RMAN: While Connected to the Root Container
Андрей Волков

Андрей Волков

Системное, сетевое администрирование +DBA. И немного программист!))  Профиль автора.

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 ... 1638 views Андрей Волков Sat, 29 Feb 2020, 10:01:33
RMAN: Specifying the Backup Us...
RMAN: Specifying the Backup Us... 2483 views Андрей Волков Sat, 29 Feb 2020, 10:14:03
RMAN: Checking for Corruption ...
RMAN: Checking for Corruption ... 26951 views Андрей Волков Thu, 30 Sep 2021, 11:57:27
RMAN: Backing UP Oracle Databa...
RMAN: Backing UP Oracle Databa... 927 views Андрей Волков Wed, 29 Sep 2021, 18:27:51
Comments (0)
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Suggested Locations