"Oracle database" mistakenly deleted table space file "ora-01033ora-01110" workaround

Source: Internet
Author: User

Today tidy up the computer files, mistakenly deleted the database files, resulting in connecting the database times wrong:
Ora-01033:oracle initialization or shutdown in progress

The process of recovering files in a DOS window is logged as follows:

Microsoft Windows [version 6.1.7601]
Copyright (c) Microsoft Corporation. All rights reserved.

C:\users\administrator>set ORACLE_SID=ORCL

C:\users\administrator>sqlplus "/as sysdba"

Sql*plus:release 11.2.0.1.0 Production on Thu October 16 15:27:47 2014

Copyright (c) 1982, Oracle. All rights reserved.


Connect to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit Production
With the partitioning, OLAP, Data Mining and Real application testing options

sql> shutdown Immediate
ORA-01109: Database is not open


The database has been uninstalled.
The ORACLE routine has been closed.
Sql> start
Sp2-1506:start, @ or @@ 命令 without parameters
Sql> Startup
The ORACLE routine has been started.

Total System Global area 3373858816 bytes
Fixed Size 2180424 bytes
Variable Size 1845496504 bytes
Database buffers 1509949440 bytes
Redo buffers 16232448 bytes
The database is loaded.
ORA-01157: Unable to identify/lock data file 7-see DBWR trace file
ORA-01110: Data file 7: ' G:\ORACLETABLESPACE\STUDENT. DBL '


sql> shutdown Immediate
ORA-01109: Database is not open


The database has been uninstalled.
The ORACLE routine has been closed.
Sql> Startup Mout
sp2-0714: Invalid STARTUP option combination
Sql> Startup Mount
The ORACLE routine has been started.

Total System Global area 3373858816 bytes
Fixed Size 2180424 bytes
Variable Size 1845496504 bytes
Database buffers 1509949440 bytes
Redo buffers 16232448 bytes
The database is loaded.
Sql> Recover datafile 7
ORA-00283: Recovery session canceled due to an error
ORA-01110: Data file 7: ' G:\ORACLETABLESPACE\STUDENT. DBL '
ORA-01157: Unable to identify/lock data file 7-see DBWR trace file
ORA-01110: Data file 7: ' G:\ORACLETABLESPACE\STUDENT. DBL '


Sql> Recover datafile 7
ORA-00283: Recovery session canceled due to an error
ORA-01110: Data file 7: ' G:\ORACLETABLESPACE\STUDENT. DBL '
ORA-01157: Unable to identify/lock data file 7-see DBWR trace file
ORA-01110: Data file 7: ' G:\ORACLETABLESPACE\STUDENT. DBL '


Sql> Startup Mount
ORA-01081: Unable to start ORACLE that is already running-please close it first
Sql> Recover datafile 7
ORA-00283: Recovery session canceled due to an error
ORA-01110: Data file 7: ' G:\ORACLETABLESPACE\STUDENT. DBL '
ORA-01157: Unable to identify/lock data file 7-see DBWR trace file
ORA-01110: Data file 7: ' G:\ORACLETABLESPACE\STUDENT. DBL '

Sql> Recover datafile 7
ORA-00283: Recovery session canceled due to an error
ORA-01110: Data file 7: ' G:\ORACLETABLESPACE\STUDENT. DBL '
ORA-01157: Unable to identify/lock data file 7-see DBWR trace file
ORA-01110: Data file 7: ' G:\ORACLETABLESPACE\STUDENT. DBL '


Sql> Recover datafile 7
ORA-00283: Recovery session canceled due to an error
ORA-01110: Data file 7: ' G:\ORACLETABLESPACE\STUDENT. DBL '
ORA-01157: Unable to identify/lock data file 7-see DBWR trace file
ORA-01110: Data file 7: ' G:\ORACLETABLESPACE\STUDENT. DBL '


Sql> select flashback_on from Vdatabase;
Select flashback_on from Vdatabase
*
An error occurred on line 1th:
ORA-01219: Database not open: Only allow queries in fixed tables/views


sql> recover DataFile ' G:\ORACLETABLESPACE\STUDENT. DBL '
ORA-00283: Recovery session canceled due to an error
ORA-01110: Data file 7: ' G:\ORACLETABLESPACE\STUDENT. DBL '
ORA-01157: Unable to identify/lock data file 7-see DBWR trace file
ORA-01110: Data file 7: ' G:\ORACLETABLESPACE\STUDENT. DBL '


Sql> select File_name,file_id,tablespace_name from Dba_data_files;
Select File_name,file_id,tablespace_name from Dba_data_files
*
An error occurred on line 1th:
ORA-01219: Database not open: Only allow queries in fixed tables/views


sql> startup Mount;
ORA-01081: Unable to start ORACLE that is already running-please close it first
Sql> alter session set Nld_language=american;
Alter session Set Nld_language=american
*
An error occurred on line 1th:
ORA-02248: Invalid ALTER SESSION option


Sql> alter session set Nls_language=american;

Session altered.

sql> ALTER DATABASE open;
ALTER DATABASE Open
*
ERROR at line 1:
Ora-01157:cannot identify/lock data file 7-see DBWR trace file
Ora-01110:data file 7: ' G:\ORACLETABLESPACE\STUDENT. DBL '


sql> ALTER DATABASE open;
ALTER DATABASE Open
*
ERROR at line 1:
Ora-01157:cannot identify/lock data file 7-see DBWR trace file
Ora-01110:data file 7: ' G:\ORACLETABLESPACE\STUDENT. DBL '

sql> ALTER DATABASE DataFile ' G:\ORACLETABLESPACE\STUDENT. DBL ' offline drop;

Database altered.

sql> ALTER DATABASE DataFile ' G:\ORACLETABLESPACE\STUDENT. DBL ' offline drop;

Database altered.

sql> ALTER DATABASE open;

Database altered.

Sql>

***********************************************************
At this point, the recovery is complete, the database can be connected to normal use.

Principle: Database boot to Nomount state, find initialization parameter file (Inittestdb.ora), according to this location to control file;

"Oracle database" mistakenly deleted table space file "ora-01033ora-01110" workaround

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.