--db相关信息
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
--删除当前controlfile
SQL> show parameter control
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string /u01/oracle/oracle11/flash_rec
overy_area/ora11/control02.ctl
control_management_pack_access string DIAGNOSTIC+TUNING
SQL> !
[oracle@ora11 ~]$ cd /u01/oracle/oracle11/flash_recovery_area/ora11/
[oracle@ora11 ora11]$ ls -l
total 9536
-rw-r--r-- 1 oracle oinstall 9748480 Oct 1 17:52 control02.ctl
[oracle@ora11 ora11]$ rm control02.ctl
[oracle@ora11 ora11]$ ls -l
total 0
--在proc文件系统中找到进程ckpt调用的文件信息
[oracle@ora11 ora11]$ ps -ef | grep ckpt | grep -v grep
oracle 15790 1 0 17:49 ? 00:00:00 ora_ckpt_ora11
[oracle@ora11 ora11]$ cd /proc/15790/fd
[oracle@ora11 fd]$ ls -l
total 0
lr-x------ 1 oracle oinstall 64 Oct 1 17:53 0 -> /dev/null
l-wx------ 1 oracle oinstall 64 Oct 1 17:53 1 -> /dev/null
l-wx------ 1 oracle oinstall 64 Oct 1 17:53 10 -> /u01/oracle/oracle11/diag/rdbms/ora11/ora11/trace/ora11_ora_15712.trc
l-wx------ 1 oracle oinstall 64 Oct 1 17:53 11 -> /u01/oracle/oracle11/diag/rdbms/ora11/ora11/trace/ora11_ora_15712.trm
lr-x------ 1 oracle oinstall 64 Oct 1 17:53 12 -> /u01/oracle/oracle11/product/11.2/rdbms/mesg/oraus.msb
lr-x------ 1 oracle oinstall 64 Oct 1 17:53 13 -> /dev/zero
lr-x------ 1 oracle oinstall 64 Oct 1 17:53 14 -> /proc/15790/fd
lr-x------ 1 oracle oinstall 64 Oct 1 17:53 15 -> /dev/zero
lrwx------ 1 oracle oinstall 64 Oct 1 17:53 16 -> /u01/oracle/oracle11/product/11.2/dbs/hc_ora11.dat
lrwx------ 1 oracle oinstall 64 Oct 1 17:53 17 -> /u01/oracle/oracle11/product/11.2/dbs/lkORA11
lrwx------ 1 oracle oinstall 64 Oct 1 17:53 18 -> /u01/oracle/oracle11/flash_recovery_area/ora11/control02.ctl (deleted)
lr-x------ 1 oracle oinstall 64 Oct 1 17:53 19 -> /u01/oracle/oracle11/product/11.2/rdbms/mesg/oraus.msb
l-wx------ 1 oracle oinstall 64 Oct 1 17:53 2 -> /dev/null
l-wx------ 1 oracle oinstall 64 Oct 1 17:53 3 -> /u01/oracle/oracle11/product/11.2/rdbms/log/ora11_ora_15712.trc
lr-x------ 1 oracle oinstall 64 Oct 1 17:53 4 -> /dev/null
lr-x------ 1 oracle oinstall 64 Oct 1 17:53 5 -> /dev/null
lr-x------ 1 oracle oinstall 64 Oct 1 17:53 6 -> /dev/null
lrwx------ 1 oracle oinstall 64 Oct 1 17:53 7 -> /u01/oracle/oracle11/product/11.2/dbs/hc_ora11.dat
lrwx------ 1 oracle oinstall 64 Oct 1 17:53 8 -> /u01/oracle/oracle11/product/11.2/dbs/lkinstora11 (deleted)
lr-x------ 1 oracle oinstall 64 Oct 1 17:53 9 -> /proc/15790/fd
[oracle@ora11 fd]$ exit
exit
SQL> alter system checkpoint;
System altered.
SQL> /
System altered.
SQL> /
System altered.
SQL> /
System altered.
SQL> /
System altered.
SQL> !
[oracle@ora11 ~]$ cd /proc/15790/fd
[oracle@ora11 fd]$ ls -l
total 0
lr-x------ 1 oracle oinstall 64 Oct 1 17:53 0 -> /dev/null
l-wx------ 1 oracle oinstall 64 Oct 1 17:53 1 -> /dev/null
l-wx------ 1 oracle oinstall 64 Oct 1 17:53 10 -> /u01/oracle/oracle11/diag/rdbms/ora11/ora11/trace/ora11_ora_15712.trc
l-wx------ 1 oracle oinstall 64 Oct 1 17:53 11 -> /u01/oracle/oracle11/diag/rdbms/ora11/ora11/trace/ora11_ora_15712.trm
lr-x------ 1 oracle oinstall 64 Oct 1 17:53 12 -> /u01/oracle/oracle11/product/11.2/rdbms/mesg/oraus.msb
lr-x------ 1 oracle oinstall 64 Oct 1 17:53 13 -> /dev/zero
lr-x------ 1 oracle oinstall 64 Oct 1 17:53 14 -> /proc/15790/fd
lr-x------ 1 oracle oinstall 64 Oct 1 17:53 15 -> /dev/zero
lrwx------ 1 oracle oinstall 64 Oct 1 17:53 16 -> /u01/oracle/oracle11/product/11.2/dbs/hc_ora11.dat
lrwx------ 1 oracle oinstall 64 Oct 1 17:53 17 -> /u01/oracle/oracle11/product/11.2/dbs/lkORA11
lrwx------ 1 oracle oinstall 64 Oct 1 17:53 18 -> /u01/oracle/oracle11/flash_recovery_area/ora11/control02.ctl (deleted)
lr-x------ 1 oracle oinstall 64 Oct 1 17:53 19 -> /u01/oracle/oracle11/product/11.2/rdbms/mesg/oraus.msb
l-wx------ 1 oracle oinstall 64 Oct 1 17:53 2 -> /dev/null
lrwx------ 1 oracle oinstall 64 Oct 1 17:54 20 -> /u01/oracle/oracle11/oradata/ora11/system01.dbf
lrwx------ 1 oracle oinstall 64 Oct 1 17:54 21 -> /u01/oracle/oracle11/oradata/ora11/sysaux01.dbf
lrwx------ 1 oracle oinstall 64 Oct 1 17:54 22 -> /u01/oracle/oracle11/oradata/ora11/undotbs01.dbf
lrwx------ 1 oracle oinstall 64 Oct 1 17:54 23 -> /u01/oracle/oracle11/oradata/ora11/users01.dbf
lrwx------ 1 oracle oinstall 64 Oct 1 17:54 24 -> /u01/oracle/oracle11/oradata/ora11/example01.dbf
l-wx------ 1 oracle oinstall 64 Oct 1 17:53 3 -> /u01/oracle/oracle11/product/11.2/rdbms/log/ora11_ora_15712.trc
lr-x------ 1 oracle oinstall 64 Oct 1 17:53 4 -> /dev/null
lr-x------ 1 oracle oinstall 64 Oct 1 17:53 5 -> /dev/null
lr-x------ 1 oracle oinstall 64 Oct 1 17:53 6 -> /dev/null
lrwx------ 1 oracle oinstall 64 Oct 1 17:53 7 -> /u01/oracle/oracle11/product/11.2/dbs/hc_ora11.dat
lrwx------ 1 oracle oinstall 64 Oct 1 17:53 8 -> /u01/oracle/oracle11/product/11.2/dbs/lkinstora11 (deleted)
lr-x------ 1 oracle oinstall 64 Oct 1 17:53 9 -> /proc/15790/fd
--通过dd命令恢复当前控制文件
[oracle@ora11 fd]$ dd if=18 f=/u01/oracle/oracle11/flash_recovery_area/ora11/control02.ctl
19040+0 records in
19040+0 records out
9748480 bytes (9.7 MB) copied, 1.40606 seconds, 6.9 MB/s
[oracle@ora11 fd]$ cd /u01/oracle/oracle11/flash_recovery_area/ora11/
[oracle@ora11 ora11]$ ls -l
total 9536
-rw-r--r-- 1 oracle oinstall 9748480 Oct 1 17:55 control02.ctl
[oracle@ora11 ora11]$ exit
exit
--关闭数据库
SQL> shutdwon immediate;
--启动数据库
SQL> startup
ORACLE instance started.
Total System Global Area 497995776 bytes
Fixed Size 1337464 bytes
Variable Size 398460808 bytes
Database Buffers 92274688 bytes
Redo Buffers 5922816 bytes
Database mounted.--控制文件恢复正常
Database opened.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28278387/viewspace-747814/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/28278387/viewspace-747814/