您的位置:首页 > 其它

为11.2.0.4的rac开启归档

2015-10-25 16:16 369 查看
为11.2.0.4的rac开启归档:

参考文档:

How To Enable/Disable Archive Logging In RAC Environment for 10.2 and higher version (文档 ID 1186764.1)

请注意,开启归档的过程,并没有修改cluster_database参数,原因如下:

Please note, from 10.2 onwards, 
it is no longer required to modify cluster_database parameter to change archive log mode. 
Please refer to

Database Oracle Clusterware and Oracle Real Application Clusters Administration and Deployment Guide
What's New in Oracle Real Application Clusters Administration and Deployment?

"Changing the Archiving Mode

You no longer need to modify the CLUSTER_DATABASE parameter setting to change the archiving mode in Oracle RAC. 
You can change archive log mode as long as the database is mounted in the local instance and not open in any instances."

如下是操作过程:

[root@leihost1 ~]# su - oracle
[oracle@leihost1 ~]$ 
[oracle@leihost1 ~]$ 
[oracle@leihost1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun Oct 25 16:03:15 2015

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> 
SQL> 
SQL> show parameter db_uni

NAME         TYPE  VALUE
------------------------------------ ----------- ------------------------------
db_unique_name        string  orcl
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@leihost1 ~]$ srvctl stop database -d orcl 
[oracle@leihost1 ~]$ srvctl start database -d orcl -o mount
[oracle@leihost1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun Oct 25 16:05:06 2015

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> show parameter inst

NAME         TYPE  VALUE
------------------------------------ ----------- ------------------------------
active_instance_count       integer
cluster_database_instances      integer  2
instance_groups        string
instance_name        string  orcl1
instance_number        integer  1
instance_type        string  RDBMS
instant_restore        boolean  FALSE
open_links_per_instance       integer  4
parallel_instance_group       string
parallel_server_instances      integer  2
SQL> show parameter dest_1

NAME         TYPE  VALUE
------------------------------------ ----------- ------------------------------
db_create_online_log_dest_1      string
log_archive_dest_1       string
log_archive_dest_10       string
log_archive_dest_11       string
log_archive_dest_12       string
log_archive_dest_13       string
log_archive_dest_14       string
log_archive_dest_15       string
log_archive_dest_16       string
log_archive_dest_17       string
log_archive_dest_18       string

NAME         TYPE  VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_19       string
SQL> alter system set log_archive_dest_1='location=+fra' scope=both;

System altered.

SQL> show parameter dest_1

NAME         TYPE  VALUE
------------------------------------ ----------- ------------------------------
db_create_online_log_dest_1      string
log_archive_dest_1       string  location=+fra
log_archive_dest_10       string
log_archive_dest_11       string
log_archive_dest_12       string
log_archive_dest_13       string
log_archive_dest_14       string
log_archive_dest_15       string
log_archive_dest_16       string
log_archive_dest_17       string
log_archive_dest_18       string

NAME         TYPE  VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_19       string
SQL> alter database archivelog;

Database altered.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[oracle@leihost1 ~]$ srvctl stop database -d orcl 
[oracle@leihost1 ~]$ srvctl start database -d orcl
[oracle@leihost1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun Oct 25 16:07:51 2015

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> archive log list;   
Database log mode        Archive Mode
Automatic archival        Enabled
Archive destination        +FRA
Oldest online log sequence     8
Next log sequence to archive   9
Current log sequence        9
SQL> select name from v$archived_log;

no rows selected

SQL> alter system switch logfile;

System altered.

SQL> select name from v$archived_log;

NAME
--------------------------------------------------------------------------------
+FRA/orcl/archivelog/2015_10_25/thread_1_seq_9.256.894038911

SQL> show parameter reco

NAME         TYPE  VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time      integer  7
db_recovery_file_dest       string
db_recovery_file_dest_size      big integer 0
db_unrecoverable_scn_tracking      boolean  TRUE
recovery_parallelism       integer  0
SQL>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: