一、配置ORACLE recovery area:
SQL> alter system set db_recovery_file_dest_size=4G;
System altered.
SQL> alter system set db_recovery_file_dest='+RECOVERAREA';
System altered.
二、配置数据库归档
1.将两个数据库实例都关闭:
shutdown immediate
2.启动实例1到mount状态:
SQL> startup mount
ORACLE instance started.
Total System Global Area 209715200 bytes
Fixed Size 1218556 bytes
Variable Size 88082436 bytes
Database Buffers 117440512 bytes
Redo Buffers 2973696 bytes
Database mounted.
3.修改归档模式
SQL> alter system set log_archive_dest_1='location=+ARCH';
System altered.
SQL> alter database archivelog;
Database altered.
4.启动实例
SQL> alter database open;
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination +ARCH
Oldest online log sequence 9
Next log sequence to archive 10
Current log sequence 10
5.实例2直接startup
6.测试归档切换,之后可以在asm中查看到归档文件。
ASMCMD> pwd
+arch/orcl/archivelog/2013_03_12
ASMCMD> ls -trl
Type Redund Striped Time Sys Name
ARCHIVELOG UNPROT COARSE MAR 12 14:00:00 Y thread_1_seq_10.256.809878563
ARCHIVELOG UNPROT COARSE MAR 12 14:00:00 Y thread_2_seq_2.257.809878663
阅读(946) | 评论(0) | 转发(0) |