0

I've Oracle CDB with PDB

In the PDB I created a tablespace then I created a table over this tablespace

after that, I login into RMAN for the CDB database then I make a backup using

backup database ;

then I drop the table using

drop table table1 purge

then I login to the RMAN FOR PDB and making the following command

alter tablespace mytablesapce offline ; 
restore tablespace mytablesapce  ; 
recover tablespace mytablesapce  ;
alter tablespace mytablesapce online ; 

every thing until now is correct

but the problem is when I'm trying to select from table1 give me

the table or view does not exist

Also, I tried to restore all database but the same problem

could you help me, thank you

I've Oracle CDB with PDB

In the PDB I created a tablespace then I created a table over this tablespace

after that, I login into RMAN for the CDB database then I make a backup using

backup database ;

then I drop the table using

drop table table1 purge

then I login to the RMAN FOR PDB and making the following command

alter tablespace mytablesapce offline ; 
restore tablespace mytablesapce  ; 
recover tablespace mytablesapce  ;
alter tablespace mytablesapce online ; 

every thing until now is correct

but the problem is when I'm trying to select from table1 give me

the table or view does not exist

Also, I tried to restore all database but the same problem

could you help me, thank you

MT0
  • 143,790
  • 11
  • 59
  • 117
Tariq Hajeer
  • 308
  • 2
  • 14

1 Answers1

1

The reason why your current method not work because:

  1. You take tablespace offline
  2. You restore tablespace (it return to your latest backup of that tablespace).
  3. You recover your tablespace - It means that Oracle Instance will apply all changes made to that Tablespace and that recover will consisting of action Dropping table.

Solution: You have to use "Point In Time" recovery method! And that point should be the time when your (full) database backup takes place (or at least right in front of dropping action). The RMAN frame should be:

run {
set until SCN=<specify SCN here>;
restore database;
recover database;
alter database open resetlogs;
}

Good luck!

Duong
  • 465
  • 5
  • 13
  • Okay thank you I've a question " It means that Oracle Instance will apply all changes made to that Tablespace and that recover will consisting of action Dropping table." He'll get instructions from the archive log, is that correct? – Tariq Hajeer Jun 25 '23 at 23:36
  • No, it is not correct! They (RMAN) will choose appropriate redo entries according to your Recovery Point. Archive log contains redo entries, but the instructions of applying which backup/archive/redo log file ... is chosen by RMAN's nature! – Duong Jun 26 '23 at 03:18