Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How can I get my data in .dbf file?

Posted on 2004-09-11
6
Medium Priority
?
6,412 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
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 

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 750 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

916 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