归档问题
1-开启归档功能,使数据库处于归档模式下
先关闭数据库:shutdown immediate
启动到mount状态:startup mount
开启归档功能:alter database archivelog;
打开数据库:alter database open;
2-开启闪回flashback功能(归档下才可开启数据库闪回)
查看flashback是否开启:select name,flashback_on from v$database;
查看闪回恢复区及大小是否设置:show parameter db_recovery;
先设置闪回恢复区的大小:alter system set db_recovery_file_dest_size='2G';
再设置闪回恢复区路径:alter system set db_recovery_file_dest='/u01/oracle/db_recovery_file_dest';
设置数据库回退的时间,默认1440分钟为一天时间:alter system set db_flashback_retention_target = 1440;
启动到mount状态:startup mount;
开启flashback功能:alter database flashback on;
打开数据库:alter database open;