Oralce 10g rac 归档模式修改


这几天一直想修改rac归档模式,一直没有搞,今早起来参照以下文档,并增加自己的一些操作,更改成功,意在为以后出现此问题可以直接使用解决问题,其中红色字体为自己按本机操作的。

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=’*';

注明:*代表本机的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.

注明:如果上面指定的目录一下需要用root用户创建,并用chown -R oracle:dba /archive ,我分别在两个结点上创建这个目录,

当指定后,然后切换日志就可以到看在该目录生成相应的文件。(alter system switch logfile;)

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

  • 1
  • 2
  • 下一页

相关内容