Home » RDBMS Server » Backup & Recovery » reuse existing dbf file from another corrupted DB
reuse existing dbf file from another corrupted DB [message #278400] Sat, 03 November 2007 15:06 Go to next message
echai
Messages: 1
Registered: November 2007
Location: Hong Kong
Junior Member
Dear all professionals, Sad

I have an oracle DB installed in windows XP. But, few days ago, the windows XP was attacked by virus and cannot be startup back.

I have decided to buy a new harddisk and reinstall everything!

Now, I am installing a fresh windows XP and oracle DB in my "NEW" HardDisk. I would like to use back the old dbf files (which stores all the data) in the old harddisk which is storing the corrupted windows xp. Is it possible to do this?

Simply, my situation is...
my oracle DB is being stored in a windows that cannot startup now. But all the files in the Harddisk can be retrieve. Now, New Hard disk will be used and everything will be reinstall into new harddisk. Is it possible to copy the DB into new Harddisk and retrieve the old data

Simply, my question is,
can I have the original data in my new oracle db? Can I simply reuse back the old dbf files? Or, can I simply clone the old oracle DB into my new harddrive now??

Please kindly help! I have spent many days to fix it and I am very tired to keep fighting on this... Sad

I don't wanna lost the data in the DB

Many Many Many Many Many Many Many Many Many Thanks!
Re: reuse existing dbf file from another corrupted DB [message #278404 is a reply to message #278400] Sat, 03 November 2007 15:18 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:

Can I simply reuse back the old dbf files? Or, can I simply clone the old oracle DB into my new harddrive now?

Yes.
The new database is useless. Drop it and its associated service.
Copy your files, all the database files (control file, redo logs, data, configuration files...) in the new hardisk, if possible at the same location (directories).
Then use oradim to create the service: oradim -new <sid> -startmode manual
Start the service if it is not already started.
Execute sqlplus "/ as sysdba" and try a startup.
If all files were copied in the same location, this should work.
If not, post (copy and paste) your SQL*Plus session here.

Regards
Michel
Re: reuse existing dbf file from another corrupted DB [message #278445 is a reply to message #278400] Sun, 04 November 2007 07:05 Go to previous messageGo to next message
varu123
Messages: 754
Registered: October 2007
Senior Member
Install new oracle through OUI and give the desired service name during installation.
When the database is created. Exit OUI.Shutdown the database.Stop the service.Overwrite every datafile,control file with the old files. Create a new password file and your database is ready.
Re: reuse existing dbf file from another corrupted DB [message #278451 is a reply to message #278445] Sun, 04 November 2007 07:35 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
No, it may create a service, if you ask to create a database, but it may not be the correct one it you don't have the same SID and all this is just useless when what you just have to do it is execute oradim.
Why do you want to create a database just to overwrite the files? Just create the service.

Regards
Michel

[Updated on: Sun, 04 November 2007 07:36]

Report message to a moderator

Re: reuse existing dbf file from another corrupted DB [message #278452 is a reply to message #278400] Sun, 04 November 2007 07:46 Go to previous messageGo to next message
varu123
Messages: 754
Registered: October 2007
Senior Member
In any case,the OP has to install oracle.Instead of dropping the new database created during installation,Wouldn't it work if he just overwrites the datafiles and control files.He gets the old database he was working on.
The SID is already created during installation and yes it should be the same as in the old control files.
Whats the need to run DBCA?

[Updated on: Sun, 04 November 2007 07:48]

Report message to a moderator

Re: reuse existing dbf file from another corrupted DB [message #278453 is a reply to message #278452] Sun, 04 November 2007 07:57 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:

Instead of dropping the new database created during installation

This is an optional step, he does not have to create a database during installation.

Quote:

The SID is already created during installation and yes it should be the same as in the old control files.

Only if it created it during installation.

Quote:

Whats the need to run DBCA?

Who talk about DBCA? Only you, I talked about ORADIM.

Regards
Michel


Re: reuse existing dbf file from another corrupted DB [message #278454 is a reply to message #278452] Sun, 04 November 2007 08:02 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Oh yes! I see my mistake.
This is XP edition and I was talking about other Oracle editions.
For XP, you have no choice, so OP can do it as you said.

Regards
Michel
Re: reuse existing dbf file from another corrupted DB [message #278455 is a reply to message #278400] Sun, 04 November 2007 08:16 Go to previous messageGo to next message
varu123
Messages: 754
Registered: October 2007
Senior Member
I dont see any mistake.
Probably you assumed the after oracle installation scenario and i the before one.
And how does it differ with different editions?
Re: reuse existing dbf file from another corrupted DB [message #278456 is a reply to message #278455] Sun, 04 November 2007 08:33 Go to previous message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
With the XP, db creation is mandatory at installation time and you don't have the choice in SID.
With other edition, db creation is optional at installationb (and I never let Oracle create my database from default one) and you can choose your SID, and Oracle service name depends on SID.

Regards
Michel
Previous Topic: how to force the old backup for recovery
Next Topic: Problem in using Tape drive (HP C15374A SCSI seq. devic) backup
Goto Forum:
  


Current Time: Tue Nov 26 08:19:45 CST 2024