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: Question regarding Oracle backup

Re: Question regarding Oracle backup

From: Zoran <zoranm_at_echo-on.net>
Date: 1997/02/28
Message-ID: <33179DAF.42BC@echo-on.net>#1/1

------------2C1D686C7481
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii

Tony Fernandes wrote:

>
> Hi,
>
> Hv two databases production and test each having its own directory
> structure for database files. The production database backup
> is done daily by using the tar command and saving all the database
 data,
> index, system and redo log files.
> In order to restore a production backup into the test database, I
> restore all the production files into the test databases directory
> structure and rename all the files appropriately. I then recreate the
> control file for the test database. All this works fine if the
> production database is down when I recreate the test databases'
 control
> file. If however the production database is up at the time I get an
> error saying that a datafile is in use.
>
> Does anybody know why this happens and if so whats a good work around
 ?
> Does anybody know of a quick way to take a backup of one database and
> restore it into another database
>
> I have to often restore a production backup into a test database to
> fix a bug and I wouldn't want to bring down the production database at
> that time.
>

Have a look at export/import utilities. You could export all objects from a particular schema from your production db, then import from the export file into your test db under a different schema name (if desired).

This way you can keep your prod db up all the time (and your test db). The downfall, here is that if it takes 10 minutes to do the export, online users may be updating tables during your export causing tables in your export to be "out of sync". Depending on your situation, this may or may not be a problem/concern.

Another piece of advice for the import.... use commit=y. That way Oracle will commit after every insert instead on only once at the end of the entire import - you may run out of rollback segment space if you don't.

Hope this helps, Zoran.

------------2C1D686C7481
Content-Transfer-Encoding: 7bit
Content-Type: text/html; charset=us-ascii

<HTML><BODY>

<DT>Tony Fernandes wrote:<BR>
&gt;&nbsp;<BR>
&gt; Hi,<BR>
&gt;&nbsp;<BR>
&gt; Hv two databases production and test each having its own directory<BR>
&gt; structure for database files. The production database backup<BR>
&gt; is done daily by using the tar command and saving all the database
data,<BR>
&gt; index, system and redo log files.<BR>
&gt; In order to restore a production backup into the test database, I<BR>
&gt; restore all the production files into the test databases directory<BR>
&gt; structure and rename all the files appropriately. I then recreate
the<BR>
&gt; control file for the test database. All this works fine if the<BR>
&gt; production database is down when I recreate the test databases' control<BR>
&gt; file. If however the production database is up at the time I get an<BR>
&gt; error saying that a datafile is in use.<BR>
&gt;&nbsp;<BR>
&gt; Does anybody know why this happens and if so whats a good work around
?<BR>
&gt; Does anybody know of a quick way to take a backup of one database
and<BR>
&gt; restore it into another database<BR>
&gt;&nbsp;<BR>
&gt; I have to often restore a production backup into a test database to<BR>
&gt; fix a bug and I wouldn't want to bring down the production database
at<BR>
&gt; that time.<BR>
&gt;&nbsp;<BR>

Have a look at export/import utilities. You could export all objects from a particular schema from your production db, then import from the export file into your test db under a different schema name (if desired).</DT>

<DT>&nbsp;</DT>

<DT>This way you can keep your prod db up all the time (and your test db). The downfall, here is that if it takes 10 minutes to do the export, online users may be updating tables during your export causing tables in your export to be &quot;out of sync&quot;. Depending on your situation, this may or may not be a problem/concern.</DT>

<DT>&nbsp;</DT>

<DT>Another piece of advice for the import.... use commit=y. That way Oracle will commit after every insert instead on only once at the end of the entire import - you may run out of rollback segment space if you don't.</DT>

<DT>&nbsp;</DT>

<DT>Hope this helps, Zoran.&nbsp;</DT>

</BODY>
</HTML>
------------2C1D686C7481-- Received on Fri Feb 28 1997 - 00:00:00 CST

Original text of this message

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