for e.g. database unable up cause of datafile corruption
SQL> startup ORACLE instance started. Total System Global Area 1610612736 bytes Fixed Size 2177912 bytes Variable Size 396149896 bytes DATABASE Buffers 1207959552 bytes Redo Buffers 4325376 bytes DATABASE mounted. ORA-01113: file 2 needs media recovery ORA-01110: DATA file 2: '/oradata/oracle/ts/undotbs01.
commonly the database unable be startup if UNDO or SYSTEM table space need recovery, if these happen we need correct temporary workaround to handle this, all workaround for each tablespace datafile is similar
do the recovery
SQL> recover DATABASE; ORA-00279: CHANGE 7516226638 generated at 05/05/2008 12:32:11 needed FOR thread 1 ORA-00289: suggestion : /oradata/oracle/ts/arc/1_42_653916655.dbf ORA-00280: CHANGE 7516226638 FOR thread 1 IS IN sequence #42 Specify log: {ret=suggested | filename | AUTO | CANCEL} AUTO ORA-00308: cannot open archived log ‘/oradata/oracle/ts/arc/1_42_653916655.dbf’ ORA-27037: unable TO obtain file STATUS SVR4 Error: 2: No such file OR directory Additional information: 3
Open database
SQL> ALTER DATABASE open; ALTER DATABASE open * ERROR at line 1: ORA-01113: file 2 needs media recovery ORA-01110: DATA file 2: '/oradata/oracle/ts/undotbs01.dbf'
this condition force us to append archivelog or logfile consist appropriate sequence, if there not available... database unable up till to ever
but we have a temporary solution, below :
- Edit Init file
Remark parameterundo_managementdanundo_tablespace
add this parameter :
UNDO_MANAGEMENT=MANUAL
_ALLOW_RESETLOGS_CORRUPTION = TRUE
_ALLOW_ERROR_SIMULATION = TRUE
_CORRUPTED_ROLLBACK_SEGMENTS =(_SYSSMU1,_SYSSMU2,_SYSSMU3, ...) - get value _CORRUPTED_ROLLBACK_SEGMENTS from [OS] the command
cd system_datafile_directory
strings system01.dbf | grep _SYSSMU | cut -d $ -f 1 | sort -u - shutdown database , and turn on with that initfile already edited. Pfile must be wrote in startup command .
SQL> startup mount pfile='/data1/oracle/product/10.2.0/dbs/initts.ora'; ORACLE instance started. Total System Global Area 1610612736 bytes Fixed Size 2177912 bytes Variable Size 396149896 bytes DATABASE Buffers 1207959552 bytes Redo Buffers 4325376 bytes DATABASE mounted.
- Recover database until cancel
SQL> recover DATABASE until cancel; ORA-00279: CHANGE 7516226638 generated at 05/05/2008 12:32:11 needed FOR thread 1 ORA-00289: suggestion : /oradata/oracle/ts/arc/1_42_653916655.dbf ORA-00280: CHANGE 7516226638 FOR thread 1 IS IN sequence #42 Specify log: {ret=suggested | filename | AUTO | CANCEL} CANCEL ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below ORA-01194: file 1 needs more recovery TO be consistent ORA-01110: DATA file 1: ‘/oradata/oracle/ts/system01.dbf’ ORA-01112: media recovery NOT started
- Open database
SQL> ALTER DATABASE OPEN RESETLOGS; DATABASE altered.
after the database up, backup important data using exp/imp
om dulu saya pake command ini :
_ALLOW_RESETLOGS_CORRUPTION = TRUE
setelah itu oleh metalink sangat disarankan untuk mengganti database. dikarenakan controlfilenya sudah inconsistent. statement tersebut hanya bisa digunakan sekali untuk menyelamatkan data jika salah satu datafile corrupt sehingga startup db failed.
Tks
Gracias por recopilar conocimiento...