Monday, 28 November 2022

Oracle : Experiment guaranteed restore point usage

At the start of this experiment Flashback is off. Meaning flashback is not a requirement for restore point.

V$database:Flashback_on=NO

 SQL> create restore point test guarantee flashback database;


Restore point created.


SQL> create table test (a number);

Table created.

SQL> insert into test values(1000);

1 row created.

SQL> commit;

Commit complete.

SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 4496291200 bytes
Fixed Size                  9037184 bytes
Variable Size             872415232 bytes
Database Buffers         3607101440 bytes
Redo Buffers                7737344 bytes
Database mounted.

SQL> flashback database to restore point test;

Flashback complete.

SQL> shut immediate
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 4496291200 bytes
Fixed Size                  9037184 bytes
Variable Size             872415232 bytes
Database Buffers         3607101440 bytes
Redo Buffers                7737344 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open


SQL> alter database open resetlogs;

Database altered.

SQL> drop restore point test;

Restore point dropped.

SQL> select * from test;
select * from test
              *
ERROR at line 1:
ORA-00942: table or view does not exist


SQL>

No comments:

Post a Comment