A recovery instance that causes Oracle database to fail to be started due to a system crash

Source: Internet
Author: User

The author opensOracle DatabaseWhen preparing for something, suddenly the computer blue screen,System Crash. After the instance is restarted, start the instance and prepare to connect to the Oracle database for continued use, but find that the instance cannot be connected, always reported:

 
 
  1. SQL> conn system/test @ test
  2.  
  3. ERROR:
  4.  
  5. ORA-12514: TNS: The Listener currently cannot identify the Service requested in the connection Descriptor

At first, I thought that the database was not started, so I restarted the Database Service and still could not connect to the database. At that time, I did not doubt the database was faulty, this is because the system crashes many times when the oracle database is opened, and the system can still be used normally after being restarted.

After several failed connections, I remembered to look at the alter file. A problem occurred:

 
 
  1. Sun Jul 17 13:26:15 2011  
  2.  
  3. Recovery of Online Redo Log: Thread 1 Group 2 Seq 3 Reading mem 0  
  4.  
  5. Mem# 0 errs 0: D:\ORACLE\PRODUCT\10.2.0\DB_1\ORADATA\TEST\REDO02.LOG  
  6.  
  7. Sun Jul 17 13:26:15 2011  
  8.  
  9. Errors in file d:\oracle\product\10.2.0\db_1\admin\test\bdump\test_dbw0_2904.trc:  
  10.  
  11. ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [_kcbzdh+583] [PC:0x4A41AF] [ADDR:0xECDC0214] [UNABLE_TO_READ] [] 

The REDO02.LOG of the redo log file Group 2 needs to be restored.

Here, because it is a new database and there is no important data, it is OK as long as the database can be restored. Take the following measures:

Delete this file and restart to open the database:

 
 
  1. SQL> startup mount
  2.  
  3. The ORACLE routine has been started.
  4.  
  5. Total System Global Area 167772160 bytes
  6.  
  7. Fixed Size 1247876 bytes
  8.  
  9. Variable Size 71304572 bytes
  10.  
  11. Database Buffers 88080384 bytes
  12.  
  13. Redo Buffers 7139328 bytes
  14.  
  15. The database has been loaded.

Run the following code:

 
 
  1. SQL> alter database open;
  2.  
  3. Alter database open
  4.  
  5. *
  6.  
  7. Row 3 has an error:
  8.  
  9. ORA-00313: Unable to open a member of log group 2 (for thread 1)
  10.  
  11. ORA-00312: Online log 2 thread 1:
  12.  
  13. 'D: \ ORACLE \ PRODUCT \ 10.2.0 \ DB_1 \ ORADATA \ TEST \ REDO02.LOG'
  14.  
  15. ORA-27041: Unable to open file
  16.  
  17. OSD-04002: Unable to open file
  18.  
  19. O/S-Error: (OS 2) the system cannot find the specified file.
  20.  
  21. SQL> select group #, sequence #, status from v $ log;
  22.  
  23. GROUP # SEQUENCE # STATUS
  24.  
  25. --------------
  26.  
  27. 1 2 INACTIVE
  28.  
  29. 3 1 INACTIVE
  30.  
  31. 2 3 CURRENT

Because I deleted the current log file, the error cannot be automatically restored.

 
 
  1. SQL> alter database drop logfile member 'd: \ ORACLE \ PRODUCT \ 10.2.0 \ DB_1 \ ORADATA \ T
  2.  
  3. EST \ REDO02.LOG ';
  4.  
  5. Alter database drop logfile member 'd: \ ORACLE \ PRODUCT \ 10.2.0 \ DB_1 \ ORADATA \ TEST \ R
  6.  
  7. Edo02.log'
  8.  
  9. *
  10.  
  11. Row 3 has an error:
  12.  
  13. ORA-00361: Unable to delete the last log Member
  14.  
  15. D: \ ORACLE \ PRODUCT \ 10.2.0 \ DB_1 \ ORADATA \ TEST \ REDO02.LOG (group 2)

You cannot delete the REDO02.LOG, but you do not want to rename the log. Restore the deleted REDO02.LOG.

 
 
  1. SQL> alter database recover;
  2.  
  3. The database has been changed.
  4.  
  5. SQL> alter database open;
  6.  
  7. The database has been changed.
  8.  
  9. SQL> shutdown immediate;
  10.  
  11. The database has been closed.
  12.  
  13. The database has been detached.
  14.  
  15. The ORACLE routine has been disabled.
  16.  
  17. SQL> startup
  18.  
  19. The ORACLE routine has been started.
  20.  
  21. Total System Global Area 167772160 bytes
  22.  
  23. Fixed Size 1247876 bytes
  24.  
  25. Variable Size 71304572 bytes
  26.  
  27. Database Buffers 88080384 bytes
  28.  
  29. Redo Buffers 7139328 bytes
  30.  
  31. The database has been loaded.
  32.  
  33. The database has been opened.
  34.  
  35. SQL>

In this way, the Oracle database can be used again.

Note: The above method can only be applied to the testing environment of the local machine or the testing environment that is not important. Do not perform this operation on the production database without worrying about data loss, to avoid data loss.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.