クリティカル データファイル |
SYSTEM,UNDO表領域 |
---|---|
非クリティカル データファイル |
SYSTEM,UNDO表領域以外の表領域 |
SQL> show parameter control_files
NAME TYPE VALUE
------------------------- ----------- ------------------------------
control_files string /u01/app/oracle/oradata/orcl/c
ontrol01.ctl, /u01/app/oracle/
oradata/orcl/control02.ctl
SQL> !ls -l /home/oracle/12101/oradata/orcl/*.ctl
-rw-r----- 1 oracle oinstall 17973248 XX XX XX:XX 2017 control01.ctl -rw-r----- 1 oracle oinstall 17973248 XX XX XX:XX 2017 control02.ctl
SQL> ALTER SYSTEM SET control_files = 2 '/u01/app/oracle/oradata/orcl/control01.ctl', 3 '/u01/app/oracle/oradata/orcl/control02.ctl', 4 '/u01/app/oracle/oradata/orcl/control03.ctl' 5 SCOPE=spfile; System altered. SQL> show parameter control_files NAME TYPE VALUE ------------------------- ----------- ------------------------------ control_files string /u01/app/oracle/oradata/orcl/c ontrol01.ctl, /u01/app/oracle/ oradata/orcl/control02.ctl
SQL> SHUTDOWN IMMEDIATE
Database closed.
Database dismounted.
ORACLE instance shut down.
$ cd /u01/app/oracle/oradata/orcl $ ls *.ctl control01.ctl control02.ctl $ cp -p control02.ctl control03.ctl $ ls *.ctl control01.ctl control02.ctl control03.ctl
$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.1.0 Production on XX XX XX XX:XX:XX 2017 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 801701888 bytes Fixed Size 2293496 bytes Variable Size 327155976 bytes Database Buffers 465567744 bytes Redo Buffers 6684672 bytes Database mounted. Database opened. SQL> SELECT status FROM v$instance; STATUS ------------ OPEN SQL> show parameter control_files NAME TYPE VALUE ------------------------- ----------- ------------------------------ control_files string /u01/app/oracle/oradata/orcl/c ontrol01.ctl, /u01/app/oracle/ oradata/orcl/control02.ctl, /u 01/app/oracle/oradata/orcl/con trol03.ctl
SQL> SELECT group#,bytes,members,status FROM v$log;
GROUP# BYTES MEMBERS STATUS
---------- ---------- ---------- ----------------
1 52428800 1 INACTIVE
2 52428800 1 INACTIVE
3 52428800 1 CURRENT
CURRENT | 現在アクティブのロググループ |
---|---|
ACTIVE | 非アクティブだがインスタンスリカバリで 必要な変更情報が含まれるロググループ |
INACTIVE | 非アクティブのロググループ |
UNUSED | 1度も使用していないロググループ。 作成時はこの状態となる。 |
SQL> SELECT group#,type,member FROM V$logfile;
GROUP# TYPE MEMBER
---------- ------- --------------------------------------------------
3 ONLINE /u01/app/oracle/oradata/orcl/redo03.log
2 ONLINE /u01/app/oracle/oradata/orcl/redo02.log
1 ONLINE /u01/app/oracle/oradata/orcl/redo01.log
SQL> ALTER DATABASE ADD LOGFILE MEMBER 2 '/u01/app/oracle/oradata/orcl/redo01_01.log' TO GROUP 1; Database altered. SQL> SELECT group#,type,member FROM V$logfile; GROUP# TYPE MEMBER ---------- ------- -------------------------------------------------- 3 ONLINE /u01/app/oracle/oradata/orcl/redo03.log 2 ONLINE /u01/app/oracle/oradata/orcl/redo02.log 1 ONLINE /u01/app/oracle/oradata/orcl/redo01.log 1 ONLINE /u01/app/oracle/oradata/orcl/redo01_01.log SQL> SELECT group#,bytes,members,status FROM v$log; GROUP# BYTES MEMBERS STATUS ---------- ---------- ---------- ---------------- 1 52428800 2 INACTIVE 2 52428800 1 INACTIVE 3 52428800 1 CURRENT
$ ls *.ctl control01.ctl control02.ctl control03.ctl $ rm control03.ctl $ ls *.ctl control01.ctl control02.ctl
SQL> shutdown immediate ORA-00210: cannot open the specified control file ORA-00202: control file: '/u01/app/oracle/oradata/orcl/control03.ctl' ORA-27041: unable to open file Linux-x86_64 Error: 2: No such file or directory Additional information: 3 SQL> shutdown abort ORACLE instance shut down.
SQL> startup ORACLE instance started. Total System Global Area 801701888 bytes Fixed Size 2293496 bytes Variable Size 327155976 bytes Database Buffers 465567744 bytes Redo Buffers 6684672 bytes ORA-00205: error in identifying control file, check alert log for more info SQL> SELECT status FROM v$instance; STATUS ------------ STARTED
SQL> show parameter diag
NAME TYPE VALUE
---------------------------- ----------- ------------------------------
diagnostic_dest string /u01/app/oracle
$ cd /u01/app/oracle/diag $ ls afdboot asm clients diagtool em ios netcman plsqlapp tnslsnr apx asmtool crs dps gsm lsnrctl ofm rdbms
$ tail -10 /u01/app/oracle/diag/rdbms/orcl/orcl/trace/alert_orcl.log
…
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/oradata/orcl/control03.ctl'
$ cd /u01/app/oracle/oradata/orcl/ $ ls -l control*.ctl -rw-r-----. 1 oracle dba 18169856 3月 22 14:01 2016 control01.ctl -rw-r-----. 1 oracle dba 18169856 3月 22 14:01 2016 control02.ctl $ cp -p control01.ctl control03.ctl
$ sqlplus / as sysdba SQL> SELECT status FROM v$instance; STATUS ------------ STARTED SQL> ALTER DATABASE MOUNT; Database altered. SQL> ALTER DATABASE OPEN; Database altered.
SQL> select member,group# from v$logfile;
MEMBER GROUP# -------------------------------------------------- ---------- /u01/app/oracle/oradata/orcl/redo03.log 3 /u01/app/oracle/oradata/orcl/redo02.log 2 /u01/app/oracle/oradata/orcl/redo01.log 1 /u01/app/oracle/oradata/orcl/redo01_01.log 1 SQL> ! rm /u01/app/oracle/oradata/orcl/redo01_01.log SQL> ! ls -l /u01/app/oracle/oradata/orcl/redo01_01.log ls: cannot access /u01/app/oracle/oradata/orcl/redo01_01.log : そのようなファイルやディレクトリはありません
SQL> startup force ORACLE instance started. Total System Global Area 801701888 bytes Fixed Size 2293496 bytes Variable Size 327155976 bytes Database Buffers 465567744 bytes Redo Buffers 6684672 bytes Database mounted. Database opened. SQL> SELECT status FROM v$instance; STATUS ------------ OPEN
Errors in file /u01/app/oracle/diag/rdbms/orcl/ORCL/trace/orcl_ora_6178.trc: ORA-00313: open failed for members of log group 1 of thread 1 ORA-00312: online log 1 thread 1:'/u01/app/oracle/oradata/orcl/redo01_01.log' ORA-27037: unable to obtain file status
$ cd /u01/app/oracle/oradata/orcl/ $ ls redo0* redo01.log redo02.log redo03.log $ cp -p redo01.log redo01_01.log $ ls redo0* redo01.log redo01_01.log redo02.log redo03.log