Statement
First of all, this method can not recover the data. The purpose of this paper is to restore the database to normal, data can be discarded, mostly in the test environment.
Phenomenon
Delete the data file of the table space, resulting in an error when shutting down the database and the startup database, as follows:
SQL> startup;
ORACLE instance started.
Total System Global Area 4008546304 bytes
Fixed Size 2259440 bytes
Variable Size 872416784 bytes
Database Buffers 3120562176 bytes
Redo Buffers 13307904 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 7 - see DBWR trace file
ORA-01110: data file 7: '/data/oracle/oradata/orclstd/PSR1.dbf'
Because an 8K table space can only have a maximum of 32g, this table space specifies multiple DBF files, and several DBF files are deleted at one time. There is an operation [drop user XXX cascade;], Delete the user’s, and the table space does not exist, but [startup;] Database, or error. Use the following statement to close the data file:
SQL> alter database datafile '/data/oracle/oradata/orclstd/PSR1.dbf' offline drop;
Database 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: '/data/oracle/oradata/orclstd/PSR2.dbf'
SQL> alter database datafile '/data/oracle/oradata/orclstd/PSR2.dbf' offline drop;
Database altered.
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01157: cannot identify/lock data file 9 - see DBWR trace file
ORA-01110: data file 9: '/data/oracle/oradata/orclstd/psr1_02.dbf'
SQL> alter database datafile '/data/oracle/oradata/orclstd/psr1_02.dbf' offline drop;
Database altered.
SQL> alter database open;
Database altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.
Total System Global Area 4008546304 bytes
Fixed Size 2259440 bytes
Variable Size 872416784 bytes
Database Buffers 3120562176 bytes
Redo Buffers 13307904 bytes
Database mounted.
Database opened.
SQL> exit
If other dBfs affect the database startup, execute [alter database open;] When the error is detected, continue the cycle until no error is detected.
Read More:
- The processing method after deleting idea’s. IML file by mistake
- Oracle database file is damaged, Error:ORA-01033 :ORACLE initialization or shutdown in progress
- Encapsulation of adding, deleting and modifying database by JDBC
- The problem of master-slave database synchronization stop caused by MySQL deleting data
- In the XML configuration file of spring jdbc.properties The connection to the database failed due to garbled code
- Transfer: completely solve the problem that the browser home page is tampered by deleting the script file
- An error is reported when kettle connects Oracle database and MySQL database
- Oracle database missing init.ora Solutions
- The transaction log for database ‘xxxx’ is full due to AVAILABILITY_REPLICA error message in SQL Ser…
- MySQL error: error 1010 (HY000) when deleting database
- Oracle data file space release
- Andorid: Installation failed due to invalid APK file due to version mismatch
- How to Solve mybatis returns null when querying Oracle database with char type field
- Failed to create Oracle Oracle home user solution appears in oracle12c installation
- A series of errors encountered in connecting to the database using Oracle SQL developer
- Error 945 Database cannot be opened due to inaccessible files or insufficient memory or disk space
- Oracle 11gR2 RAC ohasd failed to start solution
- The problem of [connection lost contact] after C # code connecting Oracle database for a period of time
- Oracle quick replacement undo table space method
- Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package