The database cannot open the ORA-01122 ORA-01251 because the data file is not deleted illegally

Source: Internet
Author: User

Today, a colleague asked me to say that his local database was deleted by him by mistake, so he could not open the file. Let's take a look.
SQL> conn jjw/jjw
ERROR:
ORA-01033: Oracle initialization or shutdown in progress

Warning: You are no longer connected to ORACLE.
SQL>
The database has been started, but an error is returned. If yes, I will restart the system to see what error is reported.
SQL> conn/as sysdba
Connected.
SQL> shutdown immediate
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1224736768 bytes
Fixed Size 2020384 bytes
Variable Size 218106848 bytes
Database Buffers 989855744 bytes
Redo Buffers 14753792 bytes
Database mounted.
ORA-01122: database file 10 failed verification check
ORA-01110: data file 10: '/oracle/database/tabj_tab.dbf'
ORA-01251: Unknown File Header Version read for file number 10

SQL>
First, you must delete the problematic file from the database.
SQL> startup mount
ORACLE instance started.
Total System Global Area 1224736768 bytes
Fixed Size 2020384 bytes
Variable Size 218106848 bytes
Database Buffers 989855744 bytes
Redo Buffers 14753792 bytes
Database mounted.
SQL> alter database datafile '/oracle/database/tabj_tab.dbf' offline drop;
Database altered.
 
SQL> alter database open;
Database altered.
SQL>
The database returns to normal.
 
The above is only an operation in the test environment. On the official system, you must not delete files as you like.

Related Article

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.