Oracle tablespace recovery

Source: Internet
Author: User

Oracle tablespace recovery

If the test. dbf data file of test in a tablespace is deleted by mistake, and the database cannot be opened the next time you restart the database ),
Always reports an error: SQL> alter database open;
Alter database open *
ERROR at line 1:
ORA-01157: cannot identify/lock data file 6-see DBWRtrace file
ORA-01110: data file 6: '/u01/app/Oracle/oradata/orcl/test. dbf'

Solution:
1. Create a test. dbf file in the path/u01/app/oracle/oradata/orcl;
2. Use sqlplus/as sysdba to log on to the database startup force. However, an error is reported at this time;
3. Execute:
SQL> alter database datafile '/u01/app/oracle/oradata/orcl/test. dbf' offline drop;
Database altered.
 
4. Run the following command:
SQL> startupforce
ORACLE instance started.
Total System Global Area 1570009088 bytes
Fixed Size 2253584 bytes
Variable Size 973081840 bytes
Database Buffers 587202560 bytes
Redo Buffers 7471104 bytes
Database mounted.
Database opened.

5. After the above steps, the database will be open.

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.