$ crs_stat -t
SQL> select instance_name from v$instance;
SQL> archive log list
SQL> show parameter cluster
NAME TYPE VALUE
———————————— ———– ——————————
cluster_database boolean TRUE
cluster_database_instances integer 2
cluster_interconnects string
在一个节点上执行如下命令使各节点的cluster_database参数为false
SQL> alter system set cluster_database=false scope=spfile sid=’*';
用srvctl关闭所有节点实例并启动一个节点数据库到mount状态
$ srvctl stop database -d vsopdb
SQL> startup nomount
ORACLE instance started.
Total System Global Area 1.6702E+10 bytes
Fixed Size 2236256 bytes
Variable Size 1.2684E+10 bytes
Database Buffers 3992977408 bytes
Redo Buffers 23519232 bytes
SQL>
SQL> alter database mount;
Database altered.
更改数据库到归档模式
SQL> alter database archivelog;
Database altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 166
Next log sequence to archive 169
Current log sequence 169
设置两节点的归档目录,如果我们用USE_DB_RECOVERY_FILE_DEST位置的话,那么这一步就省略了
SQL> alter system set log_archive_dest_1=”location=/archvsopdb1″ scope=spfile sid=’vsopdb1′;
SQL> alter system set log_archive_dest_1=”location=/archvsopdb2″ scope=spfile sid=’vsopdb2′;
在一个节点上执行如下命令使各节点的cluster_database参数为true
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.
用srvctl启动所有节点实例
$ srvctl start database -d vsopdb
以上操作均在一个节点上完成!!
事干完了,查看下是否改过来了
节点1:
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /xxxx1
Oldest online log sequence 166
Next log sequence to archive 169
Current log sequence 169
节点2:
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /xxxx2
Oldest online log sequence 5
Next log sequence to archive 6
Current log sequence 6