oracle 11gR2 改数据库为归档模式

        前几天在公司做了oracle 11gR2  rac for aix的安装实验,记录了下将数据库非归档模式改为归档模式的

步骤,和10g步骤差不多,以下为详细步骤:

    第一步:设置归档目录大小和路径

[oracle@p520:/oracle/app/oracle]$sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.1.0 Production on Fri Feb 26 09:56:24 2010

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


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

SQL> show parameter db_recover

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string
db_recovery_file_dest_size           big integer 0
SQL> alter system set db_recovery_file_dest='+dgrecover' scope=spfile;

System altered.

SQL> show parameter spfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      +DGSYSTEM/orcl/spfileorcl.ora
SQL> alter system set db_recovery_file_dest_size=8G scope=spfile;

System altered.

     第二步:修改cluster_database的值为false


QL> alter system set cluster_database=false scope=spfile sid='orcl1';

System altered.

    第三步:停止所有节点上的实例


[oracle@p520:/oracle/app/oracle]$srvctl stop database -d orcl

   第四步:启动到mount状态,改数据库为archivelog

[oracle@p520:/oracle/app/oracle]$sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri Feb 26 10:00:25 2010

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

Connected to an idle instance.

SQL> startup mount
ORACLE instance started.

Total System Global Area 2137886720 bytes
Fixed Size                  2208496 bytes
Variable Size            1526730000 bytes
Database Buffers          603979776 bytes
Redo Buffers                4968448 bytes
Database mounted.
SQL> alter database archivelog;

Database altered.

      第五步:修改cluster_database的值为tuce

SQL> alter system set cluster_database=true scope=spfile sid='orcl1';

System altered.

      第六步:关闭数据库,用srvctl 启动所有节点上的实例

SQL> shutdown immediate
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options


[oracle@p520:/oracle/app/oracle]$srvctl start database -d orcl

          第七步:检查数据库是否为归档模式

[oracle@p520:/oracle/app/oracle]$sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri Feb 26 10:05:13 2010

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.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            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     70
Next log sequence to archive   71
Current log sequence           71

 

 

 

 

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7199859/viewspace-628045/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/7199859/viewspace-628045/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值