oracle 10g rac 启用归档模式

RAC环境,双节点,之前没有启用归档,现在因上备份软件要启用归档。

本次处理方案是将归档日志存放到双节点的本地磁盘,

[@more@]

首先选取操作系统中空闲多的分区作为归档日志存放的位置。

如下,我选用/opt分区

# df -g
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 20.00 18.78 7% 10184 1% /
/dev/hd2 10.00 8.17 19% 41599 3% /usr
/dev/hd9var 10.00 9.83 2% 1096 1% /var
/dev/hd3 4.00 3.90 3% 677 1% /tmp
/dev/hd1 25.00 10.00 60% 37970 2% /home
/dev/hd11admin 0.25 0.25 1% 5 1% /admin
/proc - - - - - /proc
/dev/hd10opt 60.00 58.52 3% 4763 1% /opt

每个节点分别执行
# cd /opt
# ls
IBM RPM_inst_root eclipse2 nbu_software
IBMinvscout Tivoli freeware pconsole
LicenseUseManagement cam hsc perfwb
ORCLcluster csm ibm perl
ORCLfmap diagnostics lost+found
# mkdir ora_archive
# ls
IBM RPM_inst_root eclipse2 nbu_software
IBMinvscout Tivoli freeware ora_archive
LicenseUseManagement cam hsc pconsole
ORCLcluster csm ibm perfwb
ORCLfmap diagnostics lost+found perl
# chown -R oracle:oinstall ora_archive
设置本地归档日志存放目录

SQL> alter system set log_archive_dest='/opt/ora_archive' sid='keyan1';

System altered.

SQL> alter system set log_archive_dest='/opt/ora_archive' sid='keyan2';

System altered.

关闭集群所有节点实例 $ srvctl stop database -d keyan

在每个节点分别执行
$ sqlplus "/as sysdba"

SQL*Plus: Release 10.2.0.4.0 - Production on Tue Jul 14 11:46:12 2009

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Connected to an idle instance.

SQL> startup mount
ORACLE instance started.

Total System Global Area 1610612736 bytes
Fixed Size 2084400 bytes
Variable Size 939524560 bytes
Database Buffers 654311424 bytes
Redo Buffers 14692352 bytes
Database mounted.
SQL> alter database archivelog;

Database altered.

SQL> alter database open;

Database altered.

SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /opt/ora_archive
Oldest online log sequence 141
Next log sequence to archive 142
Current log sequence 142
SQL>

重新启动集群所有节点实例 $ srvctl start database -d keyan

强制切换归档查看结果
$ date
Tue Jul 14 12:22:23 CDT 2009
$ sqlplus "/as sysdba"

SQL*Plus: Release 10.2.0.4.0 - Production on Tue Jul 14 12:22:33 2009

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> alter system switch logfile;

System altered.

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
$ ls -al
total 114944
drwxr-xr-x 2 oracle oinstall 256 Jul 14 12:22 .
drwxr-xr-x 23 root system 4096 Jul 14 11:37 ..
-rw-rw---- 1 oracle oinstall 17235968 Jul 14 12:22 1_142_682350777.dbf
-rw-r----- 1 oracle oinstall 41601536 Jul 14 11:47 2_53_682350777.dbf


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

转载于:http://blog.itpub.net/570433/viewspace-1024122/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值