天天看點

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>