资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

11gRAC归档与非归档的切换

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://cdkjz.cn/article/gjdeoc.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220