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
Solved

How can I get my data in .dbf file?

Posted on 2004-09-11
6
6,380 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Suggested Solutions

Title # Comments Views Activity
oracle 11g 23 107
sort a spool into file output in oracle 1 44
SQL Workhours Count beetween Workhours 3 26
Row_number in SQL 6 33
Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

860 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