ORA-01157 error & quot; cannot identify/lock data file & quot

Source: Internet
Author: User

ORA-01157 error "cannot identify/lock data file" solve sqlplus access to the database as an administrator, error occurs at startup, as follows:> sqlplus "/as sysdba" SQL> startup ...... ORA-01157: cannot identify/lock data file 8-see DBWR trace fileORA-01110: data file 8: '/tmp/test. dbf' check the database log file alert _ $ ORACLE_SID.log. The error message Errors in file ...... /aix85_psp0_454886.trc: view the record information in this trc file: *** service name :() 10:05:00. 769 *** session id: (332.1): 00.769ORA-01157: cannot identify/lock data file 8-see DBWR trace fileORA-01110: data file 8: '/tmp/test. dbf 'ora-27037: unable to obtain file statusIBM aix risc System/6000 Error: 2: No such file or directoryAdditional information: 3ORA-01157: cannot identify/lock data file 9-see DBWR trace fileORA-01110: data file 9: '/tmp/test1.dbf' ORA-27037: unable to obtain file statusIBM aix risc System/6 000 Error: 2: No such file or directoryAdditional information: 3ORA-01157: cannot identify/lock data file 10-see DBWR trace fileORA-01110: data file 10: '/tmp/indx1.dbf' ORA-27037: unable to obtain file statusIBM aix risc System/6000 Error: 2: No such file or directoryAdditional information: 3ORA-01157: cannot identify/lock data file 11-see DBWR trace fileORA-01110: data file 11: '/tmp/test2.db F 'ora-27037: unable to obtain file statusIBM aix risc System/6000 Error: 2: No such file or directoryAdditional information: 3ORA-01157: cannot identify/lock data file 12-see DBWR trace file query and analysis: Check that no dbf file exists in the/tmp directory, check and confirm that several dbf Files in the/tmp directory are the test space Files Added during database operation. After the test is completed, the files have been deleted and no one has accessed these files in the future, therefore, no database error is reported until the database instance is down and restarted. Solution: Since the dbf Files reported are no longer used, the solution is relatively simple. You only need to delete the corresponding data file and delete the corresponding new tablespace. The procedure is as follows: SQL> shutdown immediate; SQL> startup mount; SQL> select file #, name, status from v $ datafile; SQL> alter database datafile '/tmp/test. dbf 'offline drop; // If drop is not added here, an error is returned. If you view the v $ datafile table again, you will find that the status of several corresponding dbf Files changes from ONLINE to RECOVERSQL> select * from v $ tablespace; SQL> drop tablespace test including contents cascade constraints ;...... after the deletion is completed, execute startup again.

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.