Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Restoring backup

Re: Restoring backup

From: Dusan Bolek <pagesflames_at_usa.net>
Date: 4 Nov 2003 03:07:47 -0800
Message-ID: <1e8276d6.0311040307.457bc730@posting.google.com>


"Slava Pechenin" <slava_at_pechenin.ru> wrote in message news:<1067930075.69443_at_iq.wbt.ru>...
> Hi,
>
> To restore backup I use the following procedure:
> 1) drop database
> 2) create database, many options, time consuming
> 3) imp.exe to import data
>
> The data backup is done as follows:
> exp USERID=user/pass BUFFER=8192 FILE=OUTPUT.DMP GRANTS=Y INDEXES=Y ROWS=Y
> CONSTRAINTS=Y COMPRESS=Y OWNER=user FEEDBACK=10 log=expo.log
>
> Restore:
> imp USERID=user/pass BUFFER=8192 FILE=OUTPUT.DMP IGNORE=N GRANTS=Y INDEXES=Y
> ROWS=Y FULL=Y COMMIT=Y log=imp.log
>
> Can I delete all objects from database before restoring and simply import
> data with droping/creating database (i.e. skip steps 1,2)?

Are you really talking about backup/recovery? From your post it looks like this is a) recurring activity b) deleting of old data. Neither of these two looks like recovery to me. Recovery should not be recurring activity (if is then there is something wrong in your systems) and usually you do not have problem with deleting data, because the very principle of need for recovery is that you do not have data anymore. However, if this is really backup & recovery then you should know that exp/imp is not backup & recovery tool (ok, maybe as supplement part yes, but not main way how to do your backups) and HJR will for sure tell you more on this very soon.
If you just need restore your test data back to original shape after some tests then you have several ways:

  1. if you have all data in one schema you can delete this user and exp/imp only this schema, no need to delete all DB
  2. you can use offline backup and after tests just copy all related files over original files (DB must be down)
  3. use flashback functionality in 9i to return your database to time before tests
  4. you can use script to do all stuff with recreating database (no need to use dbca)

I would personally prefer option a, because is really straightforward and up to 10GB quite quick and painless even for unexperienced staff.

--
with regards

Dusan Bolek
Received on Tue Nov 04 2003 - 05:07:47 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US