CAUSE
when database was not shutdown properly for example hanged database or abnormal shutdown of server due to power etc.
SOLUTION
First Try:
[oracle@localhost ~]$ sqlplus / as sysdba
SQL> shutdown;OR
SQL> shutdown immediate;
Then note the error massege and do accordingly.
SQL> alter database recover database until cancel;
if the above command fails try
SQL> alter database recover database until cancel;
if the above command fails try
SQL> recover database using backup controlfile until cancel;
on success type
on success type
SQL> ALTER DATABASE OPEN RESETLOGS;
Then stop and restart oracle service.
Then stop and restart oracle service.
Second Try:
[oracle@localhost ~]$ sqlplus / as sysdba
SQL> startup nomount
SQL> alter database mount;
SQL> alter database open;
SQL> alter database open RESETLOGS;
alter database open RESETLOGS
*
ERROR at line 1:
ORA-01245: offline file 1 will be lost if RESETLOGS is done
ORA-01110: data file 1: '/u01/app/oracle/oradata/sr/system01.dbf'
RECOVER DATAFILE
SQL> alter database open RESETLOGS;
alter database open RESETLOGS
*
ERROR at line 1:
ORA-01245: offline file 1 will be lost if RESETLOGS is done
ORA-01110: data file 1: '/u01/app/oracle/oradata/sr/system01.dbf'
RECOVER DATAFILE
SQL> alter database datafile '/u01/app/oracle/oradata/gh/system01.dbf' offline drop;
SQL> alter database datafile '/u01/app/oracle/oradata/gh/system01.dbf' online;
Database altered.
SQL> alter database open NORESETLOGS;
Database altered.
SQL> alter database datafile '/u01/app/oracle/oradata/gh/system01.dbf' online;
Database altered.
SQL> alter database open NORESETLOGS;
Database altered.
SQL> shutdown;
Database closed.
Database dismounted.
ORACLE instance shut down.
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.
Total System Global Area 2042241024 bytes
Fixed Size 1337548 bytes
Variable Size 553649972 bytes
Database Buffers 1476395008 bytes
Redo Buffers 10858496 bytes
Database mounted.
Database opened.
ORACLE instance started.
Total System Global Area 2042241024 bytes
Fixed Size 1337548 bytes
Variable Size 553649972 bytes
Database Buffers 1476395008 bytes
Redo Buffers 10858496 bytes
Database mounted.
Database opened.
SQL>
No comments:
Post a Comment