I am administering an Oracle 8.1.7 database. One of the nonsystem datafiles is lost. When I try to create the file...
it gives the following error though I have the entry of the same in v$datafile. I have tried recreating the control file and then creating the datafile, but still, it gives the following error:
SQL> alter database create datafile 'c:oracleoradatapractpract01.dbf'; alter database create datafile 'c:oracleoradatapractpract01.dbf' * ERROR at line 1: ORA-01178: file 9 created before last CREATE CONTROLFILE, cannot recreate ORA-01110: data file 9: 'C:ORACLEORADATAPRACTPRACT01.DBF'Few days back I had recreated the control file but that also had the entry for this file.
You cannot create the file in this manner. While other vendor's RDBMS platforms may support this convention, Oracle does not. Why not drop the entire tablespace and then recreate it? Use the DROP TABLESPACE and CREATE TABLESPACE commands. When creating the tablespace again, you will be creating the datafile at the same time. This is akin to what you are trying to accomplish. Otherwise, use a backup to restore the lost datafile.
For More Information
- Dozens more answers to tough Oracle questions from Brian Peasland are available.
- The Best Oracle Web Links: tips, tutorials, scripts, and more.
- Have an Oracle or SQL tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
- Ask your technical Oracle and SQL questions -- or help out your peers by answering them -- in our live discussion forums.
- Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.
Dig Deeper on Oracle database design and architecture
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.