Oracle RAC 11gR2開啟歸檔

Tattao發表於2021-01-07

一、fk資料庫

1、關閉監聽

lsnrctl stop


2、備份引數檔案

SQL> create pfile='/tmp/initfk.ora' from spfile;


3、修改資料庫叢集引數

oracle@EPC1-C3:/home/oracle$ export ORACLE_SID=fk1

oracle@EPC1-C3:/home/oracle$ sqlplus / as sysdba


SQL*Plus: Release 19.0.0.0.0 - Production on Wed Dec 30 16:46:51 2020

Version 19.9.0.0.0


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


Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.9.0.0.0


SQL> show parameter cluster


NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

cdb_cluster                          boolean     FALSE

cdb_cluster_name                     string

cluster_database                     boolean     TRUE

cluster_database_instances           integer     2

cluster_interconnects                string

SQL>



4、停止兩節點資料庫例項,開啟節點1例項

#srvctl stop database -d fk


#srvctl start database -d fk -i fk1 -o mount


5、建立、配置歸檔路徑並開啟歸檔路徑,將叢集引數修改至原值

oracle@EPC1-C3:/home/oracle$ sqlplus / as sysdba


SQL*Plus: Release 19.0.0.0.0 - Production on Wed Dec 30 16:49:44 2020

Version 19.9.0.0.0


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


Connected to an idle instance.


SQL> startup nomount;

ORACLE instance started.


Total System Global Area 1.0737E+10 bytes

Fixed Size                 12446800 bytes

Variable Size            3892314112 bytes

Database Buffers         6777995264 bytes

Redo Buffers               54661120 bytes

SQL> alter database mount;


Database altered.


SQL> alter system set log_archive_dest_1='location=+data_dg/FK/fkarch' scope=spfile sid='*';


System altered.


SQL> alter database archivelog;


Database altered.


SQL> alter system set cluster_database=true scope=spfile sid='*';


System altered.


SQL> shutdown immediate

ORA-01109: database not open



Database dismounted.

ORACLE instance shut down.

SQL>


oracle@EPC1-C3:/home/oracle$ srvctl start database -d fk


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30258496/viewspace-2748126/,如需轉載,請註明出處,否則將追究法律責任。

相關文章