Recover table of Pluggable Database with RMAN (Point in time recovery)

Recover table of Pluggable Database with RMAN Auxiliary (Point in time recovery)

Following are the steps show the example of recovering the table of Pluggable database with RMAN Point in time recovery methodL

1. Connect with the Pluggable Database.

sqlplus hr@pdb3
SQL*Plus: Release 18.0.0.0.0 - Production on Tue Mar 12 14:16:42 2019
Version 18.4.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production
Version 18.4.0.0.0

2. Create a table for testing.

SQL> CREATE TABLE test (id NUMBER);
Table created.
SQL> INSERT INTO test VALUES (1);
1 row created.
SQL> COMMIT;
Commit complete.

3. Check the SCN Number of Database.

SQL> select dbms_flashback.get_system_change_number from dual;
GET_SYSTEM_CHANGE_NUMBER
------------------------
1936644

4. Drop the test table.

drop table hr.test;

5. Connect with RMAN and start the table recovery process.

RECOVER TABLE 'HR'.'TEST' of pluggable database PDB3 UNTIL SCN 1936644 AUXILIARY DESTINATION 'd:\restore';

RMAN> RECOVER TABLE 'HR'.'TEST' of pluggable database PDB3 UNTIL SCN 1936644 AUXILIARY DESTINATION d:\restore' ;

Starting recover at 12-MAR-19
using channel ORA_DISK_1
RMAN-05026: warning: presuming following set of tablespaces applies to specified point-in-time

List of tablespaces expected to have UNDO segments
Tablespace SYSTEM
Tablespace PDB3:SYSTEM
Tablespace UNDOTBS1
Tablespace PDB3:UNDOTBS1

Creating automatic instance, with SID='udFa'

initialization parameters used for automatic instance:
db_name=XE
db_unique_name=udFa_pitr_PDB3_XE
compatible=18.0.0
db_block_size=8192
db_files=200
diagnostic_dest=D:\ORACLE\18.0.0
_system_trig_enabled=FALSE
sga_target=1536M
processes=200
db_create_file_dest=d:\restore
log_archive_dest_1='location=d:\restore'
----------------------Continue ----

Error: Use quotes on table name and schema name
RECOVER TABLE HR.TEST of pluggable database PDB3 UNTIL SCN 1936644 AUXILIARY DESTINATION ‘d:\restore’;
RMAN-01009: syntax error: found “test”: expecting one of: “double-quoted-string, identifier

6. Connect the DB with CDB

SQL> alter session set container=PDB3
Session altered.


SQL> select * from hr.test;
id
----------
1

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.