SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
NO
SQL> alter database flashback ON;
alter database flashback ON
*
ERROR at line 1:
ORA-38759: Database must be mounted by only one instance
and not open.
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
SQL> alter database flashback ON;
alter database flashback ON
*
ERROR at line 1:
ORA-38706: Cannot turn on FLASHBACK DATABASE logging.
ORA-38707: Media recovery is not enabled.
SQL> alter database archivelog;
Database altered.
SQL> alter database flashback ON;
Database altered.
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
YES
4)Open the database and optionally you can set
DB_FLASHBACK_RETENTION_TARGET to the length of the
desired flashback window in minutes. By default it
is 1 day(1440 minutes).
SQL> ALTER DATABASE OPEN;
To make it 3 days
SQL> alter database open;
Database altered.
SQL> alter system set db_flashback_retention_target=4320;
System altered.
SQL> show parameter db_flashback_retention_target
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_flashback_retention_target integer 4320
No comments:
Post a Comment