Oracle11gR2 RAC环境中启用存档日志

来源:互联网 发布:python https get请求 编辑:程序博客网 时间:2024/05/21 19:28

以 oracle 用户身份登录到一个节点(即 racnode1),通过在当前实例中将 cluster_database 设置为 FALSE 来禁用集群实例参数

[oracle@racnode1 ~]$ sqlplus / AS sysdbaSQL*Plus: Release 11.2.0.1.0 Production ON Tue Jan 31 13:48:08 2012Copyright (c) 1982, 2009, Oracle.  ALL rights reserved.Connected TO:Oracle DATABASE 11g Enterprise Edition Release 11.2.0.1.0 - 64bit ProductionWITH the Partitioning, REAL Application Clusters, Automatic Storage Management, OLAP,DATA Mining AND REAL Application Testing optionsSQL> ALTER system SET cluster_database=FALSE scope=spfile sid='racdb1';System altered.SQL>

以 oracle 用户身份关闭所有 访问集群化数据库的实例

[oracle@racnode1 ~]$ srvctl stop DATABASE -d racdb

使用本地实例,挂载数据库,启动存档功能

[oracle@racnode1 ~]$ sqlplus / AS sysdbaSQL*Plus: Release 11.2.0.1.0 Production ON Tue Jan 31 13:56:58 2012Copyright (c) 1982, 2009, Oracle.  ALL rights reserved.Connected TO an idle instance.SQL> startup mountORACLE instance started.Total System Global Area  839282688 bytesFixed SIZE                  2217992 bytesVariable SIZE             599787512 bytesDATABASE Buffers          234881024 bytesRedo Buffers                2396160 bytesDATABASE mounted.SQL> ALTER DATABASE archivelog;DATABASE altered.



通过在当前实例中将实例参数 cluster_database 修改为TRUE,重新启用对集群的支持,然后关闭本地实例

SQL> ALTER system SET cluster_database=TRUE scope=spfile sid='racdb1';System altered.SQL> shutdown immediateORA-01109: DATABASE NOT OPENDATABASE dismounted.ORACLE instance shut down.SQL>

以oracle帐户身份使用srvctl命令重启所有实例

[oracle@racnode1 ~]$ srvctl START DATABASE -d racdb
[oracle@racnode1 ~]$ sqlplus / AS sysdbaSQL*Plus: Release 11.2.0.1.0 Production ON Tue Jan 31 14:03:50 2012Copyright (c) 1982, 2009, Oracle.  ALL rights reserved.Connected TO:Oracle DATABASE 11g Enterprise Edition Release 11.2.0.1.0 - 64bit ProductionWITH the Partitioning, REAL Application Clusters, Automatic Storage Management, OLAP,DATA Mining AND REAL Application Testing optionsSQL> archive log listDATABASE log mode              Archive ModeAutomatic archival             EnabledArchive destination            USE_DB_RECOVERY_FILE_DESTOldest online log SEQUENCE     65NEXT log SEQUENCE TO archive   66CURRENT log SEQUENCE           66SQL>