天天看点

oracle 11g rac 归档 开启

背景:

数据库建设到现在,一致在做逻辑备份,考虑到后期维护人员现场情况,建议最近就将归档日志打开

过程

因为之前没有在rac开启过归档,现在在虚拟rac下测试下如果归档路径放到某个节点,或者放到存储中

grid>asmcmd

>ls

cd DATADG/

cd arch

mkdir arch

pwd 

SQL> alter system set log_archive_dest_1='location=+DATADG/arch' scope=spfile sid='*';

System altered.

关闭数据库,全部节点都要关闭

[grid@zhcs-db1 ~]$ srvctl stop database -d PROD

srvctl stop database -d PROD

srvctl start database -d PROD -o mount

SQL*Plus: Release 11.2.0.3.0 Production on 星期六 6月 11 22:30:39 2016

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,

Data Mining and Real Application Testing options

SQL> alter database archivelog;

Database altered.

SQL> alter database open;

SQL> 

SQL*Plus: Release 11.2.0.3.0 Production on 星期六 6月 11 22:34:06 2016

SQL>  alter database open;

启动另外一个节点数据库实例

oradiag_oracle

SQL*Plus: Release 11.2.0.3.0 Production on 星期二 6月 14 12:25:45 2016

SQL> archive log list;

Database log mode           Archive Mode

Automatic archival           Enabled

Archive destination           +DATADG/arch

Oldest online log sequence     35

Next log sequence to archive   36

Current log sequence           36

2016-06-17

实战中

节点二的集群关闭,高可用关闭,后来重新启动都在报错,是在没招了,重启了节点二机器,重启后发现数据库还在重启中,但是集群已经启动了

参考文档

<a href="https://oracle-base.com/articles/rac/archivelog-mode-on-rac#rac-11g">https://oracle-base.com/articles/rac/archivelog-mode-on-rac#rac-11g</a>