Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.
  1. I have DB1 database on Server1 .
  2. I have taken backup.
  3. After that I have created table TEST.
  4. Inserted some values in the TEST table.
  5. Truncated table.

And want to return my TEST table to its previous state.

  1. For this I took backup(datafiles, archive logs, controlfile, spfile)

I don't want to recover whole database, just this table is needed. It can be done by restoring and recovering database to another host, export table from the new DB and import to the existing DB(DB1).

Let's assume I have just one server... Can I restore and recover database on the same machine with the new database name?

Waiting your suggestions, I will also try to search something...

share|improve this question

migrated from stackoverflow.com Jul 22 '11 at 1:50

This question came from our site for professional and enthusiast programmers.

1  
What version of Oracle Database are you using? The reason for asking is that you may find Oracle Flashback easier to use to achieve the same results? An overview can be found here: download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/… –  Ian Carpenter Jul 20 '11 at 11:38
    
I am using 10g. Is flashbacking a good practice? It requires additional space... –  kupa Jul 20 '11 at 11:41
    
Also I have not enabled flashbacking... I wonder to know if it is possible to recover database on the SAME host(Consider that you cannot have databas instances with the same name) So you should somehow rename database before recovering,HOW? –  kupa Jul 20 '11 at 11:44
1  
@kupa, I'd recommend you ask this question on dba.stackexchange.com –  DCookie Jul 20 '11 at 14:49
    
@DCookie GREAT THANKS!!!!!!!! –  kupa Jul 20 '11 at 15:00

1 Answer 1

up vote 3 down vote accepted

The straightforward answer to this question is: use Flashback.

If you have an Enterprise Edition license I would say enabling Flashback Query is good practice. Bear in mind that we can configure the retention period to suit our needs, so it can be shorter if our system generates a lot of change or if storage is tight. These days, disk is pretty cheap so it is unusual for space to be the overriding concern. And if your server has got sufficient capacity to install an entire copy of your database you have enough space for a large Flashback Area.

However, you say you're not using Flashback, so moving on.

It is perfectly possible to edit a backed-up control file to create a new database providing it was backed-up in the correct fashion:

alter database backup controlfile to trace
/

You would need to change the database name and the paths for all the files. I admit I haven't attempted this procedure to install a second database on the same server, but I don't see why it should be different from cloning a database onto a different server.

share|improve this answer
    
Thank you, sorry for that I accepted your answer so lately. –  kupa Apr 4 '12 at 14:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.