一、归档的开关
1、查看归档是否开启:
SQL> archive log list;
2、设置归档路径
SQL> alter system set log_archive_dest_1='location=d:\arch3';
3、开归档
SQL> shutdown immediate; --关闭数据库
SQL> startup mount; --启动到mount状态
SQL> alter database archivelog; --开归档
SQL> alter database open; --打开数据库
4、关闭数据库归档
SQL> shutdown immediate;
SQL> startup mount;
SQL> alter database noarchivelog;
SQL> alter database open;
二、闪回区的开关
1、查看是否开启闪回区
SQL> select flashback_on from v$database;
2、设置闪回恢复区的大小
SQL> alter system set db_recovery_file_dest_size=30G scope=both;
3、设置闪回恢复区路径
SQL> alter system set db_recovery_file_dest='/u01/flashback' scope=both;
4、开启闪回
SQL> shutdown immediate;
SQL> startup mount;
SQL> alter database flashback on; --开启闪回
SQL> alter database open;
5、关闭闪回
SQL> alter database flashback off;