11g RAC 归档与非归档的切换
非归档------->归档
1.设置归档路径
SYS@rac1> alter system set log_archive_dest_1='LOCATION=+fra' scope=both sid='rac1';
SYS@rac2> alter system set log_archive_dest_1='LOCATION=+fra' scope=both sid='rac2';
2.关闭所有实例
shutdown immediate
3.设置归档
SYS@rac1> startup mount
SYS@rac1> alter database archivelog;
4.打开数据库
SYS@rac1> alter database open;
5。两个节点验证
节点1
SYS@rac1> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination +FRA
Oldest online log sequence 25
Next log sequence to archive 26
Current log sequence 26
节点2
SYS@rac2> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination +FRA
Oldest online log sequence 29
Next log sequence to archive 30
Current log sequence 30
6.查看归档文件
ASMCMD [+FRA/rac/archivelog/2018_03_23] > ls
thread_1_seq_26.263.971545091
thread_2_seq_29.261.971544421
thread_2_seq_30.262.971545055
归档------->非归档
1关闭数据库
[oracle@rac1 ~]$ srvctl stop database -d rac
2.其中一个节点操作
SYS@rac1> startup mount;
SYS@rac1> alter database noarchivelog;
SYS@rac1> alter database open;
3.验证
SYS@rac1> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination +FRA
Oldest online log sequence 26
Current log sequence 27
SYS@rac2> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination +FRA
Oldest online log sequence 31
Current log sequence 32
使用rman 删除归档
[oracle@rac1 ~]$ rman target /
RMAN> delete archivelog all;
ASMCMD [+fra/rac] > ls
CONTROLFILE/
ONLINELOG/
已经删除
当前题目:11gRAC归档与非归档的切换
网站路径:
http://kswjz.com/article/gjdeoc.html