Solved

How can I get my data in .dbf file?

Posted on 2004-09-11
6
6,393 Views
Last Modified: 2012-05-05
Hi all
Unfortunately, I deleted all my files in /opt/app/oracle where I installed Oracle.But all my datafiles(.dbf files),system datafiles and control files(.ctl files)  were still in /u01,/u02,/u03 directory and I still have a full-exported dump file with old data.Please help me how I can get all my data placed in my datafiles.May I recover all my data?
Sincerely yours.
0
Comment
Question by:KtmVdc2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 13

Expert Comment

by:riazpk
ID: 12034031
You can recover data upto that time when you exported that data using:

imp file=YourFileNameWithPath full=y
0
 
LVL 23

Expert Comment

by:seazodiac
ID: 12034359
Tell me that you Have tape backup for the Oracle_HOME /opt/app/oracle.

0
 
LVL 1

Expert Comment

by:sambridge
ID: 12036067
If you've only deleted only the Oracle binaries and haven't touched the database files then you can easily recover by first re-installing oracle and then creating an empty database into which you can import your export dump file.

If your export is out of date you can instead use the database files that are still on /u0* - you'll need to create the necessary admin directories and TNS entries but it's not too complicated. You can take the 'create sample database' option when yoiu install Oracle and use it as an example.
0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 

Author Comment

by:KtmVdc2
ID: 12040583
I don't have any tape backup,but I only have an export dump file with out of date data and .dbf files in /u0*.How can I get my data in.dbf files in /u0*?
It's not simple when you create an empty DB, copy all those .dbf files into it.Because new DB can't recognize .dbf files of deleted DB.
0
 
LVL 1

Accepted Solution

by:
sambridge earned 250 total points
ID: 12042769
You need to rebuild your database using a starter or empty database as an example to work from.

At this stage you want to do the bare minumum to get your database up and running. You could then do an export and import it into your new empty database.

Before you do anything else you should backup the db files that you have so anything you do here doesn't break them completely. Backup all the dbf's, ctl's etc. Then you can copy from the backed up copies if you need to retry something.

You need to create a configuration file to start your old database  so cd to your $ORACLE_HOME/dbs directory.
In there you should find the configuration file for the starter database that was created when you re-installed Oracle. It will be called init<SID>.ora - copy this to init<your old database name>.ora

e.g. cp initORCL.ora initPROD.ora (where PROD might be the name of your old database)

Now edit the new file - change any reference to the old database name. Change control file locations to point to the location of your old database control files. Alter any other filesystem locations (e.g. user_dump_dest) by creating a set of directories to use for this excercise and pointing to them. Nothing should point to the a location used by the new starter/empty database.

Once the editing is done save the file back to $ORACLE_HOME/dbs

If you're running Oracle 8 then run:
svrmgrl
connect internal
startup pfile=$ORACLE_HOME/dbs/init<your db name>.ora

If Oracle 9 then run:
sqlplus /nolog
connect / as sysdba
startup pfile=$ORACLE_HOME/dbs/init<your db name>.ora

If all is well you database should mount and start.
0
 
LVL 9

Expert Comment

by:konektor
ID: 12054382
create new database instance
startup in mount mode
change controlfiles to point to your .dbf files (using command alter database reuse controlfile ...)
alter database open
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
Suggested Courses

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question