您好,登錄后才能下訂單哦!
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進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。