$ export NLS_DATE_FORMAT='DD-MM-YYYY HH:MI:SS'
$ sqlplus / as sysdba
SQL> select flashback_on from v$DATABASE;
FLASHBACK_ON
------------------------
NO
SQL> shutdown immediate;
SQL> startup mount;
SQL> ALTER SYSTEM SET DB_FLASHBACK_RETENTION_TARGET=2880 SCOPE=BOTH;
SQL> ALTER DATABASE FLASHBACK ON;
SQL> ALTER DATABASE OPEN;
2)
SQL> ALTER PLUGGABLE DATABASE ALL OPEN;
SQL> ALTER PLUGGABLE DATABASE ALL SAVE STATE;
3) DROP USER
SQL> col username for a20
SQL> select USERNAME, COMMON, CON_ID from cdb_users
where username='C##_USER';
USERNAME COM CON_ID
-------------------- --- ----------
C##_USER YES 1
C##_USER YES 6
C##_USER YES 5
C##_USER YES 4
C##_USER YES 3
Log the SCN before dropping
SQL> select timestamp_to_scn(current_timestamp) from v$database;
TIMESTAMP_TO_SCN(CURRENT_TIMESTAMP)
-----------------------------------
2812476
SQL> drop user C##_USER cascade;
SQL> alter system switch logfile;
SQL> alter system switch logfile;
SQL> alter system switch logfile;
SQL> alter system switch logfile;
SQL> SHUTDOWN IMMEDIATE
SQL> STARTUP MOUNT
SQL> FLASHBACK DATABASE TO SCN 2812476;
SQL > ALTER DATABASE OPEN READ ONLY;
SQL>
SQL> col username for a20
SQL> select USERNAME, COMMON, CON_ID from cdb_users
2 where username='C##_USER';
USERNAME COM CON_ID
-------------------- --- ----------
C##_USER YES 1
SQL> ALTER PLUGGABLE DATABASE ALL OPEN READ ONLY;
SQL> select USERNAME, COMMON, CON_ID from cdb_users
where username='C##_USER';
USERNAME COM CON_ID
-------------------- --- ----------
C##_USER YES 3
C##_USER YES 5
C##_USER YES 1
C##_USER YES 4
C##_USER YES 6
SQL> SHUTDOWN IMMEDIATE
SQL>STARTUP MOUNT;
SQL> FLASHBACK DATABASE TO SCN 2812476;
Flashback complete.
SQL > ALTER DATABASE OPEN RESETLOGS;
3) Check user
SQL> conn C##_USER
Enter password:
Connected.
SQL> conn c##_USER@PDB2
Enter password:
Connected.
SQL> connect C##_USER@PDB2_2
Enter password:
Connected.
4) Backup DB
$ rman target /
RMAN> BACKUP DATABASE PLUS ARCHIVELOG delete all input;
...
RMAN> exit;