OMF Controlfile For Recovery

OMF Controlfile For Recovery
1)usage
1@@@@if your database use OMF,you must do as the following.
SQL> startup @@@205:missing controlfile
SQL> create pfile from spfile;
SQL> show parameter control    @@@it is a OMF format
SQL> alter system set control_file='/home/oracle/control.ctl' scope=spfile
SQL> show parameter control    @@@assure it it change,or restart.
SQL> @/home/oracle/control.sql
SQL> shutdown immediate; 
@@@it's up to the initial values of control_file 
$cp -rp /home/oracle/control.ctl  /u01/app/oracle/oradata/orcl/controlfile/o1_mf_xxxx.ctl
$cp -rp /home/oracle/control.ctl  /u01/app/oracle/oradata/orcl/controlfile/o1_mf_xxxx.ctl
SQL> conn /as sysdba; 
SQL> startup nomount
SQL> create spfile from pfile; 
SQL> startup mount; 
@@@then the controlfile created.and parameter recovery.
 
 
2)trace controlfile 
1@@@@optional
@@@maybe like: 
SQL> alter database backup controlfile to trace;
SQL> !ps
  PID TTY          TIME CMD
 4679 pts/6    00:00:00 sqlplus
 4682 pts/6    00:00:00 ps
SQL> select spid from v$session s,v$process p where s.paddr=p.addr 
     and s.terminal='pts/6'; 
SPID
------------
4680
 
@@@optional:
SQL> select spid from v$process p , v$session  s , v$mystat  m  where p.addr=s.paddr and       
     m.sid=s.sid  and rownum=1;
SPID
------------
4680
 
@@@
[oracle@station61 udump]$ pwd
/u01/app/oracle/admin/orcl/udump
[oracle@station61 udump]$ ls *4680*
orcl_ora_4680.trc
$cp -p orcl_ora_4680.trc /home/oracle/control11b.sql
 
2@@@@second way
SQL> alter database backup controlfile to trace as '/home/oracle/controlbak.sql';

你可能感兴趣的:(controlfile)