一、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