- SQL> conn / as sysdba
- Connected.
- SQL> show parameter control_file
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- control_file_record_keep_time integer 7
- 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
- [root@station4 ~]# ls -l /u01/app/oracle/oradata/orcl/control01.ctl
- -rw-r----- 1 oracle oinstall 7159808 Mar 9 14:08 /u01/app/oracle/oradata/orcl/control01.ctl
- [root@station4 ~]# rm -i /u01/app/oracle/oradata/orcl/control01.ctl
- rm: remove regular file `/u01/app/oracle/oradata/orcl/control01.ctl'? y
- SQL> shutdown immediate;
- ORA-00210: cannot open the specified control file
- ORA-00202: control file: '/u01/app/oracle/oradata/orcl/control01.ctl'
- ORA-27041: unable to open file
- Linux Error: 2: No such file or directory
- Additional information: 3
- SQL> shutdown abort
- ORACLE instance shut down.
- @@@if you want to open the database will occur errors
- SQL> startup
- ORACLE instance started.
- Total System Global Area 276824064 bytes
- Fixed Size 1218944 bytes
- Variable Size 92276352 bytes
- Database Buffers 180355072 bytes
- Redo Buffers 2973696 bytes
- ORA-00205: error in identifying control file, check alert log for more info
- @@@use oracle identify to copy the p_w_picpath copy from other contolfiles
- [oracle@station4 ~]$ cp /u01/app/oracle/oradata/orcl/control02.ctl /u01/app/oracle/oradata/orcl/control01.ctl
- @@@@alter database status
- SQL> alter database mount;
- Database altered.
- SQL> alter database open;
- Database altered.
- @@@@lab 2 add new control file
- SQL> shutdown immediate
- Database closed.
- Database dismounted./u01/app/oracle/oradata/orcl/control01.ctl
- ORACLE instance shut down.
- @@@@open database to nomount
- @@@@add new control file
- SQL> startup nomount;
- ORACLE instance started.
- Total System Global Area 276824064 bytes
- Fixed Size 1218944 bytes
- Variable Size 96470656 bytes
- Database Buffers 176160768 bytes
- Redo Buffers 2973696 bytes
- [oracle@station4 controlfile]$ cp /u01/app/oracle/oradata/ORCL/controlfile/control04.ctl /u01/app/oracle/oradata/orcl/control04.ctl
- SQL> alter system set control_files='/u01/app/oracle/oradata/orcl/control01.ctl','/u01/app/oracle/oradata/orcl/control02.ctl','/u01/app/oracle/oradata/orcl/control03.ctl','/u01/app/oracle/oradata/orcl/control04.ctl' scope=spfile;
- System altered.
- @@@shutdown database then open it
- SQL> shutdown immediate
- ORA-01507: database not mounted
- ORACLE instance shut down.
- SQL> startup
- ORACLE instance started.
- Total System Global Area 276824064 bytes
- Fixed Size 1218944 bytes
- Variable Size 96470656 bytes
- Database Buffers 176160768 bytes
- Redo Buffers 2973696 bytes
- Database mounted.
- Database opened.