flashback database要求数据库必须处于归档模式
1) how to check if flashback function and log mode is open
select dbid, name, log_mode,flashback_on from v$database; --FLASHBACK_ON为NO,则表示闪回特性尚未启用
(Another way to check log mode: sql> archive log list;)
2)check how long history database can flash back to
select oldest_flashback_scn, oldest_flashback_time from v$flashback_database;
2) how to set archivelog mode
sql> shutdown immediate
sql>startup mount
sql>archive log list;
sql>alter database archivelog;
sql>alter database open;
check the status again:
sql> archive log list;
sql>alter database flashback on;
(If meet the error not logged on when typing startup, that means the database disconnected wrong, can try startup force to start the database.)
Access RMAN:
type RMAN in terminal
RMAN>