Oracle RAC更改归档文件到ASM磁盘

01,配置磁盘路径

  ? ,nide1节点

[oracle@node1 ~]$ su - grid 
Password:
[grid@node1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Mon Mar 11 11:10:38 2019
Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL> select name from v$asm_diskgroup; NAME ------------------------------ OCR_VOTE ORADATA01 ORADATA02 SQL> alter diskgroup ORADATA01 add directory '+ORADATA01/arch1'; Diskgroup altered.

  ?,node2节点

[oracle@node2 ~]$ su - grid
Password:
[grid@node2 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Mon Mar 11 11:10:38 2019

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL> select name from v$asm_diskgroup;

NAME
------------------------------
OCR_VOTE
ORADATA01
ORADATA02

SQL> alter diskgroup ORADATA01 add directory '+ORADATA01/arch2';

Diskgroup altered.

02,设置归档地址

  登入节点一:node1

[grid@node1 ~]$ su - oracle
Password:
[oracle@node1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Mon Mar 11 11:09:48 2019

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
oracle1

SQL> archive log list;
Database log mode           No Archive Mode
Automatic archival           Disabled
Archive destination           /oracle/app/oracle/product/11.2.0/db_1/dbs/arch
Oldest online log sequence     61
Current log sequence           62
SQL> alter system set log_archive_dest_1='LOCATION=+ORADATA01/arch1' scope=spfile sid='oracle1';

System altered.

SQL> alter system set log_archive_dest_1='LOCATION=+ORADATA01/arch2' scope=spfile sid='oracle2';
System altered.

03,重启node1,node2节点并更改为归档模式

  node1:

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 2505338880 bytes
Fixed Size            2255832 bytes
Variable Size          738198568 bytes
Database Buffers     1761607680 bytes
Redo Buffers            3276800 bytes
Database mounted.
SQL> alter database archivelog;

Database altered.

SQL> shutdown immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup   -- 启动
ORACLE instance started.

Total System Global Area 2505338880 bytes
Fixed Size            2255832 bytes
Variable Size          738198568 bytes
Database Buffers     1761607680 bytes
Redo Buffers            3276800 bytes
Database mounted.
Database opened.
SQL> archive log list
Database log mode           Archive Mode
Automatic archival           Enabled
Archive destination           +ORADATA01/arch1
Oldest online log sequence     61
Next log sequence to archive   62
Current log sequence           62
SQL> alter system switch logfile;  --- 刷写日志
 
System altered.

  node2:

SQL> archive log list;
Database log mode           No Archive Mode
Automatic archival           Disabled
Archive destination           /oracle/app/oracle/product/11.2.0/db_1/dbs/arch
Oldest online log sequence     5
Current log sequence           6
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 2505338880 bytes
Fixed Size            2255832 bytes
Variable Size          738198568 bytes
Database Buffers     1761607680 bytes
Redo Buffers            3276800 bytes
Database mounted.
SQL> alter database archivelog;

Database altered.

SQL> shutdown immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 2505338880 bytes
Fixed Size            2255832 bytes
Variable Size          738198568 bytes
Database Buffers     1761607680 bytes
Redo Buffers            3276800 bytes
Database mounted.
Database opened.
SQL> archive log list
Database log mode           Archive Mode
Automatic archival           Enabled
Archive destination           +ORADATA01/arch2
Oldest online log sequence     6
Next log sequence to archive   7
Current log sequence           7
SQL> alter system switch logfile;

System altered.

04,验证归档

[oracle@node2 ~]$ su - grid
Password:
[grid@node2 ~]$ asmcmd
ASMCMD> ls
OCR_VOTE/
ORADATA01/
ORADATA02/
ASMCMD> cd ORADATA01
ASMCMD> ls
ORACLE/
arch1/
arch2/
ASMCMD> cd arch2
ASMCMD> ls
2_7_1002129034.dbf
ASMCMD> cd ../
ASMCMD> cd arch1
ASMCMD> ls
1_62_1002129034.dbf
2_6_1002129034.dbf
ASMCMD> exit

发现已经有文档了

   

转载于:https://www.cnblogs.com/kingle-study/p/10509578.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值