- Multitenant - Performing Flashback for PDB using restorepoint
oracle@srv3:~> sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Mon Aug 17 21:04:31 2020
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> CREATE RESTORE POINT pre_change FOR PLUGGABLE DATABASE plm2 GUARANTEE FLASHBACK DATABASE;
Restore point created.
SQL> col name format a20
SELECT SCN, NAME, CON_ID, PDB_RESTORE_POINT, GUARANTEE_FLASHBACK_DATABASE,CLEAN_PDB_RESTORE_POINT FROM V$RESTORE_POINT;SQL>
SCN NAME CON_ID PDB GUA CLE
---------- -------------------- ---------- --- --- ---
3478897 PRE_CHANGE 5 YES YES NO
SQL> conn infodba/infodba@plm2
Connected.
SQL> DELETE infodba.tb1;
10 rows deleted.
SQL> commit;
Commit complete.
SQL> conn / as sysdba
Connected.
SQL> ALTER PLUGGABLE DATABASE plm2 close immediate;
Pluggable database altered.
SQL> FLASHBACK PLUGGABLE DATABASE plm2 TO RESTORE POINT pre_change;
Flashback complete.
SQL> ALTER PLUGGABLE DATABASE plm2 OPEN RESETLOGS;
Pluggable database altered.
SQL> conn infodba/infodba@plm2
Connected.
SQL> select count(*) from infodba.tb1;
COUNT(*)
----------
10
SQL> conn / as sysdba
Connected.
SQL> ALTER SESSION SET CONTAINER = plm2;
Session altered.
SQL> DROP RESTORE POINT pre_change;
Restore point dropped.
No comments:
Post a Comment