您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
Oracle Study之案例--在RAW上controlfile多元化
系统环境:
操作系统: AIX 5300-08
数据库: Oracle 10.2.0.1
在通过dbca建库后,有两个控制文件,再添加一个控制文件
1、查看controlfile信息
[oracle@aix227:/home/oracle]$sqlplus '/as sysdba' SQL*Plus: Release 10.2.0.1.0 - Production on Wed Nov 19 11:15:45 2014 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production With the Partitioning, OLAP and Data Mining options SQL> show parameter control NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ control_file_record_keep_time integer 7 control_files string /u01/app/oracle/oradata/prod/c ontrol01.ctl, /u01/app/oracle/ oradata/prod/control02.ctl
2、添加新的控制文件
文件存储采用的是raw,建立符号链接文件,易于管理。
[oracle@aix227:/home/oracle]$ls -l /u01/app/oracle/oradata/prod total 0 lrwxrwxrwx 1 oracle oinstall 16 Nov 18 16:14 control01.ctl -> /dev/rcontrol1_1 lrwxrwxrwx 1 oracle oinstall 16 Nov 18 16:14 control02.ctl -> /dev/rcontrol2_2 lrwxrwxrwx 1 oracle oinstall 16 Nov 18 16:14 control03.ctl -> /dev/rcontrol3_3 lrwxrwxrwx 1 oracle oinstall 13 Nov 18 16:14 example01.dbf -> /dev/rexample lrwxrwxrwx 1 oracle oinstall 11 Nov 18 16:14 index01.dbf -> /dev/rindex lrwxrwxrwx 1 oracle oinstall 13 Nov 18 16:14 log11.log -> /dev/rredo1_1 lrwxrwxrwx 1 oracle oinstall 13 Nov 18 16:14 log12.log -> /dev/rredo1_2 lrwxrwxrwx 1 oracle oinstall 12 Nov 18 16:14 spfile01 -> /dev/rspfile lrwxrwxrwx 1 oracle oinstall 12 Nov 18 16:14 sysaux01.dbf -> /dev/rsysaux lrwxrwxrwx 1 oracle oinstall 12 Nov 18 16:14 system01.dbf -> /dev/rsystem lrwxrwxrwx 1 oracle oinstall 10 Nov 18 16:14 temp01.dbf -> /dev/rtemp lrwxrwxrwx 1 oracle oinstall 14 Nov 18 16:14 undotbs01.dbf -> /dev/rundotbs1 lrwxrwxrwx 1 oracle oinstall 11 Nov 18 16:14 users01.dbf -> /dev/rusers
SQL> show parameter spfile; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ spfile string /u01/app/oracle/oradata/prod/s pfile01 SQL> alter system set control_files= 2 '/u01/app/oracle/oradata/prod/control01.ctl','/u01/app/oracle/oradata/prod/control02.ctl','/u01/app/oracle/oradata/prod/control03.ctl' scope=spfile; System altered. SQL> startup force nomount; ORACLE instance started. Total System Global Area 977272832 bytes Fixed Size 2025592 bytes Variable Size 255854472 bytes Database Buffers 713031680 bytes Redo Buffers 6361088 bytes SQL> show parameter control NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ control_file_record_keep_time integer 7 control_files string /u01/app/oracle/oradata/prod/c ontrol01.ctl, /u01/app/oracle/ oradata/prod/control02.ctl, /u 01/app/oracle/oradata/prod/con trol03.ctl SQL> alter database mount; alter database mount * ERROR at line 1: ORA-00205: error in identifying control file, check alert log for more info 查看告警日志,无法识别control03.ctl文件!
3、复制RAW(controlfile)
SQL> shutdown abort; ORACLE instance shut down. [oracle@aix227:/home/oracle]$dd if=/dev/rcontrol1_1 of=/dev/rcontrol3_3 bs=1024k 64+0 records in 64+0 records out
4、重新启动数据库
[oracle@aix227:/home/oracle]$sqlplus '/as sysdba' SQL*Plus: Release 10.2.0.1.0 - Production on Wed Nov 19 11:26:21 2014 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to an idle instance. SQL> startup mount; ORACLE instance started. Total System Global Area 977272832 bytes Fixed Size 2025592 bytes Variable Size 255854472 bytes Database Buffers 713031680 bytes Redo Buffers 6361088 bytes Database mounted. SQL> select name from v$controlfile; NAME -------------------------------------------------------------------------------- /u01/app/oracle/oradata/prod/control01.ctl /u01/app/oracle/oradata/prod/control02.ctl /u01/app/oracle/oradata/prod/control03.ctl SQL> alter database open; Database altered.
@至此,contolfile多元化成功!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。