分类: LINUX
2010-04-09 23:11:11
1. 在其中一个节点中检查是否处于归档模式
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination /oracle/product/database/dbs/arch
Oldest online log sequence 3
Current log sequence 4
–
2. 查看并修改 cluster_database参数
SQL> show parameter cluster_database;
NAME TYPE VALUE
———————————— ———– ——————————
cluster_database boolean TRUE <——-此处修改为false
cluster_database_instances integer 2
2.1 执行如下命令使各节点的cluster_database参数为false
SQL> alter system set cluster_database=false scope=spfile sid=’*';
3. 在各节点中关闭实例
SQL> shutdown immediate; <—- RAC1
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> shutdown immediate; <— RAC2
Database closed.
Database dismounted.
ORACLE instance shut down.
4.将其中1个节点启动到 mount状态,以RAC1为例
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 281018368 bytes
Fixed Size 1267044 bytes
Variable Size 113248924 bytes
Database Buffers 163577856 bytes
Redo Buffers 2924544 bytes
SQL> alter database mount;
Database altered.
5. 修改归档模式并
SQL> alter database archivelog;
Database altered.
6. 将数据库置于open状态
SQL> alter database open;
Database altered.
6.1 指定归档目标
SQL> alter system set LOG_ARCHIVE_DEST_1=’LOCATION=/archive’;
System altered.
7. 查看cluster_database参数为false
SQL> show parameter cluster_database;
NAME TYPE VALUE
———————————— ———– ——————————
cluster_database boolean FALSE
cluster_database_instances integer 1
7.1 这时如果启动另一节点会报错
SQL> startup nomount; —> RAC2 节点置于nomount或startup会报错如:
ORA-29707: inconsistent value 2 for initialization parameter
cluster_database_instances with other instances
8. 查看数据库已经为指定位置的归档模式
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /archive
Oldest online log sequence 3
Next log sequence to archive 4
Current log sequence 4
9. 到这里我们还需要将 cluster_database参数为TRUE
SQL> alter system set cluster_database=TRUE scope=spfile sid=’*';
10. 创建pfile文件
SQL> create pfile=’/oracle/pfilerac.ora’ from spfile;
File created.
11. 启动各节点实例验证归档方式.
注:如果想修改其它节点的归档位置还需要如下设置:
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /oracle/product/database/dbs/arch
Oldest online log sequence 1
Next log sequence to archive 2
Current log sequence 2
SQL> alter system set LOG_ARCHIVE_DEST_1=’LOCATION=/archive’;
System altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /archive
Oldest online log sequence 1
Next log sequence to archive 2
Current log sequence 2
SQL> create pfile=’/oracle/pfilerac.ora’ from spfile;
File created.