背景: 数据库建设到现在,一致在做逻辑备份,考虑到后期维护人员现场情况,建议最近就将归档日志打开
因为之前没有在rac开启过归档,现在在虚拟rac下测试下如果归档路径放到某个节点,或者放到存储中
[ ~]$ export ORACLE_SID=PROD1
[ ~]$ sqlplus "/as sysdba"
SQL> alter system set log_archive_dest_1='location=+DATADG/arch' scope=spfile sid='*';
System altered.
SQL> ALTER SYSTEM SET log_archive_format='arch_%t_%s_%r.arc' SCOPE=spfile;
System altered.
关闭数据库,全部节点都要关闭
[grid@zhcs-db1 ~]$ srvctl stop database -d PROD
srvctl stop database -d PROD
srvctl start database -d PROD -o mount
[ ~]$ export ORACLE_SID=PROD1
[ ~]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.3.0 Production on 星期六 6月 11 22:30:39 2016
Copyright (c) 1982, 2011, Oracle. All rights reserved.
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;
SQL> alter database open;
[ ~]$ export ORACLE_SID=PROD2
[ ~]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.3.0 Production on 星期六 6月 11 22:34:06 2016
Copyright (c) 1982, 2011, Oracle. All rights reserved.
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 open;
[ ~]$ export ORACLE_SID=PROD1
[ ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on 星期二 6月 14 12:25:45 2016
Copyright (c) 1982, 2011, Oracle. All rights reserved.
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
Database log mode Archive Mode
Automatic archival Enabled
Archive destination +DATADG/arch
Oldest online log sequence 35
Next log sequence to archive 36
节点二的集群关闭,高可用关闭,
后来重新启动都在报错, 是在没招了,重启了节点二机器,重启后发现数据库还在重启中,但是集群已经启动了