ORA-01157: cannotidentify/lockdatafile6-seeDBWRtracefile

Source: Internet
Author: User

When swingbench was used two months ago, the cc user created 17 GB of test data (ccdata. dbf). After the test is completed,

Because it is a test machine with insufficient space, you can directly manually run the rm-rf/Data/oradata/ora11g/ccdata. dbf file.

The ORA-01157 error occurred when I restarted the DB during other tests,

ORA-01157: cannot identify/lock data file 6-see DBWR trace file

ORA-01110: data file 6: '/Data/oradata/ora11g/ccdata. dbf'

Root case: manual ccdata. dbf file,Now that you know the problem, let's proceed with it:

Ora11g </Data/oradata/ora11g> $ sqlplus/as sysdba

SQL * Plus: Release 11.2.0.3.0 Production on Fri Mar 27 08:28:41 2014

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

Connected:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> startup force;

SQL> startup force;

ORACLE instance started.

Total System Global Area 7816675328 bytes

Fixed Size 2243712 bytes

Variable Size 4529849216 bytes

Database Buffers 3271557120 bytes

Redo Buffers 13025280 bytes

Database mounted.

ORA-01157: cannot identify/lock data file 6-see DBWR trace file

ORA-01110: data file 6: '/Data/oradata/ora11g/ccdata. dbf'

SQL> col file # for a10;

SQL> col name for a50;

SQL> select file #, name from v $ datafile;

FILE # NAME

------------------------------------------------------------

1/Data/oradata/ora11g/system01.dbf

2/Data/oradata/ora11g/sysaux01.dbf

3/Data/oradata/ora11g/undotbs01.dbf

4/Data/oradata/ora11g/users01.dbf

5/Data/oradata/ora11g/example01.dbf

6/Data/oradata/ora11g/ccdata. dbf

7/Data/oradata/datafile/dp01.dbf

SQL> alter database datafile 6 offline;

Database altered.

SQL> alter database open;

Database altered.

SQL> DROP TABLESPACE CCDATA INCLUDING CONTENTS AND DATAFILES;

Tablespace dropped.

SQL> col file_name for a35;

SQL> col tablespace_namefor a15;

SQL> select tablespace_name, file_name from dba_data_files

TABLESPACE FILE_NAME

---------------------------------------------

USERS/Data/oradata/ora11g/users01.dbf

UNDOTBS1/Data/oradata/ora11g/undotbs01.dbf

SYSAUX/Data/oradata/ora11g/sysaux01.dbf

SYSTEM/Data/oradata/ora11g/system01.dbf

EXAMPLE/Data/oradata/ora11g/example01.dbf

DP_TABLE/Data/oradata/datafile/dp01.dbf

6 rows selected.

Now the problem has been solved

Test Library. Start it once with startup force:

SQL> startup force;

ORACLE instance started.

Total System Global Area 7816675328 bytes
Fixed Size 2243712 bytes
Variable Size 4529849216 bytes
Database Buffers 3271557120 bytes
Redo Buffers 13025280 bytes
Database mounted.
Database opened.

Warning: Do not manually rm data files in the database

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.