Oracle 11G RAC 修改归档模式
Oracle 11G R2 RAC修改归档模式 库建好以后默认是非归档模式,需要修改一下 推荐阅读: Oracle 11G RAC OCR 与 db_unique_name
Oracle 11G R2 RAC修改归档模式
库建好以后默认是非归档模式,需要修改一下
推荐阅读:
Oracle 11G RAC OCR 与 db_unique_name 配置关系 说明
重新配置与卸载Oracle 11GR2 Grid Infrastructure
测试第一种方法:
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 19
Current log sequence 20
SQL>
SQL> Select NAME, CREATED, LOG_MODE, CHECKPOINT_CHANGE#, ARCHIVE_CHANGE# from V$DATABASE;
NAME CREATED LOG_MODE CHECKPOINT_CHANGE# ARCHIVE_CHANGE#
--------- --------- ------------ ------------------ ---------------
MOMORAC 04-JUN-13 NOARCHIVELOG 2709486 2583268
SQL>
SQL> conn / as sysdba
Connected.
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 20
Current log sequence 21
SQL> show parameter USE_DB_RECOVERY_FILE_DEST
SQL> show parameter DB_RECOVERY_FILE_DEST
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string +FRA
db_recovery_file_dest_size big integer 5G
SQL>
SQL> show parameter LOG_ARCHIVE_START
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_start boolean FALSE
SQL>
SQL> host srvctl stop database -d momorac
SQL> host srvctl status database -d momorac
Instance momo1 is not running on node node1
Instance momo2 is not running on node node2
Instance momo3 is not running on node node3
SQL> show user;
USER is "SYS"
SQL> startup mount exclusive
ORA-03135: connection lost contact
SQL> conn / as sysdba
Connected to an idle instance.
SQL>
SQL> startup mount exclusive
ORACLE instance started.
Total System Global Area 297119744 bytes
Fixed Size 1344540 bytes
Variable Size 184552420 bytes
Database Buffers 104857600 bytes
Redo Buffers 6365184 bytes
Database mounted.
SQL> host srvctl status database -d momorac
Instance momo1 is running on node node1
Instance momo2 is not running on node node2
Instance momo3 is not running on node node3
SQL>
SQL> select OPEN_MODE from v$database;
OPEN_MODE
--------------------
MOUNTED
SQL>
SQL> conn / as sysdba
Connected to an idle instance.
SQL>
SQL> startup mount exclusive restrict;
ORACLE instance started.
Total System Global Area 297119744 bytes
Fixed Size 1344540 bytes
Variable Size 184552420 bytes
Database Buffers 104857600 bytes
Redo Buffers 6365184 bytes
Database mounted.
SQL>
同时看日志 :
ALTER SYSTEM SET local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.101.5.73)(PORT=1521))))' SCOPE=MEMORY SID='momo1';
Fri Jun 07 14:58:27 2013
NOTE: Loaded library: System
Fri Jun 07 14:58:27 2013
SUCCESS: diskgroup ASM1 was mounted
Fri Jun 07 14:58:28 2013
NOTE: dependency between database momorac and diskgroup resource ora.ASM1.dg is established
Fri Jun 07 14:58:34 2013
Successful mount of redo thread 1, with mount id 1497705681
Database mounted in Shared Mode (CLUSTER_DATABASE=TRUE)
Lost write protection disabled
Fri Jun 07 14:58:35 2013
Completed: ALTER DATABASE MOUNT
SQL>
SQL> alter database archivelog;
Database altered.
Completed: ALTER DATABASE MOUNT
Fri Jun 07 15:00:17 2013
alter database archivelog
Completed: alter database archivelog
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> host srvctl start database -d momorac
SQL> host srvctl status database -d momorac
Instance momo1 is running on node node1
Instance momo2 is running on node node2
Instance momo3 is running on node node3
SQL>
SQL> conn / as sysdba
Connected.
SQL> archivg log list;
SP2-0734: unknown command beginning "archivg lo..." - rest of line ignored.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 20
Next log sequence to archive 21
Current log sequence 21
SQL>
node2 node3上查看一下
[oracle@node2 ~]$ db_env
momo2
ORACLE_SID= momo2
[oracle@node2 ~]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.3.0 Production on Fri Jun 7 15:05:33 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
SQL> conn / as sysdba
Connected.
SQL> archiveg log list;
SP2-0734: unknown command beginning "archiveg l..." - rest of line ignored.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 14
Next log sequence to archive 15
Current log sequence 15
SQL>
[oracle@node3 ~]$ db_env
momo3
ORACLE_SID= momo3
[oracle@node3 ~]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.3.0 Production on Fri Jun 7 15:05:25 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
SQL> conn / as sysdba
Connected.
SQL> archiveg log list;
SP2-0734: unknown command beginning "archiveg l..." - rest of line ignored.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 7
Next log sequence to archive 8
Current log sequence 8
SQL>
SQL> Select NAME, INST_ID, OPEN_MODE, CREATED, LOG_MODE, CHECKPOINT_CHANGE#, ARCHIVE_CHANGE# from GV$DATABASE;
NAME INST_ID OPEN_MODE CREATED LOG_MODE CHECKPOINT_CHANGE# ARCHIVE_CHANGE#
--------- ---------- -------------------- --------- ------------ ------------------ ---------------
下一篇: oracle PGA管理(算法)
推荐阅读
-
Oracle 11g R2 RAC with ASM存储迁移--Rman copy&ASM Rebalance(一)
-
oracle 11g RAC 常用命令整理分享
-
Oracle 11G密码180天过期后的修改方法
-
oracle的归档模式 ORACLE数据库归档日志常用命令
-
oracle 11g rac 关闭和启动顺序,状态查看命令教程
-
Oracle11g RAC开启关闭、设置归档小结
-
如何查看oracle数据库是否为归档模式启动?
-
如何启动或关闭oracle的归档(ARCHIVELOG)模式?
-
Oracle切换为归档模式的步骤及问题解决
-
Oracle11g下Rac集群环境redo日志和归档管理