快上网专注成都网站设计 成都网站制作 成都网站建设
成都网站建设公司服务热线:028-86922220

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

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://6mz.cn/article/gjdeoc.html

其他资讯