Solved

How can I get my data in .dbf file?

Posted on 2004-09-11
6
6,376 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
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious sideā€¦
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
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.

777 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