SQL*Plus: Release 11.2.0.4.0 Production on Fri Aug 11 12:17:37 2023
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> archive log list; Database log mode Archive Mode --归档模式 --No Archive Mode 非归档模式 Automatic archival Enabled --自动归档 开启 Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 505058 Next log sequence to archive 505059 Current log sequence 505059 SQL>
2.节点实例状态:
SQL> show parameter cluster
NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ cluster_database boolean TRUE cluster_database_instances integer 2 cluster_interconnects string SQL> select instance_name,host_name,status from gv$instance;
INSTANCE_NAME ---------------- HOST_NAME STATUS ---------------------------------------------------------------- ------------ xjxsora1 rac1 OPEN
xjxsora2 rac2 OPEN SQL>
实例两节点都为开启状态
3.数据库集群参数:
SQL> show parameter cluster
NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ cluster_database boolean TRUE cluster_database_instances integer 2 cluster_interconnects string SQL>
cluster_database为true表示为集群数据库,否则,非集群数据库
二.开启数据库归档模式
*注: 以下操作只在一个节点上执行,本次在节点1(xjxsora1)进行的操作
1.备份参数文件:
SQL> create pfile='/u01/app/oraInventory/backup/spfilebak.ora' from spfile;
SQL*Plus: Release 11.2.0.4.0 Production on Fri Aug 11 12:17:37 2023
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS ---------------- ------------ xjxsora1 MOUNTED SQL>
修改数据库成归档模式:
SQL> alter database archivelog; Database altered. SQL>
将集群参数修改回去:
SQL> alter system set cluster_database=true scope=spfile sid='*'; System altered. SQL>