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: Recreating Oracle environment

Re: Recreating Oracle environment

From: Martin Rapier <m.rapier_at_sheffield.ac.uk>
Date: 18 Mar 1999 14:39:51 GMT
Message-ID: <01be714d$281f1a20$b110a78f@ad1mer.shef.ac.uk>


Omar Gillani <omar.gillani_at_bellsygma.com> wrote in article <7cphtt$65j4_at_dm1cns.on.bell.ca>...
Greetings Folks:

-What is the best method for recreating a production Oracle environment to
a test Oracle -environment? Assuming we cannot do a backup/restore of a production machine, what would be -the best method?

-Are Export and Import the only options, or can we do an image-copy? Is
there a utility in Oracle to -do an image-copy?

I'm not sure why you can't take an OS backup from the production machine. I've done this a few times & I find that copying the files is a lot quicker than import/export (25 Gb database). In fact, I'm doing it again next week. You need a cold backup ideally, though I guess you could take hot backups and a bunch of archive redo log files and recover it in its new location. We take a full cold backup once a week by offlining one set of mirrors and dumping that to tape.

Assuming you can copy the files, the easiest thing is to recreate an identical directory structure on your dev machine, copy all the files into the right places (including control files etc), edit any init.ora parameters (you may not have enough memory for a 1Gb SGA on your dev machine;) and off you go. You'll need to add a line to oratab and fiddle around with your listener.ora & tnsnames.ora files to set up any required network services, aliases etc.

If you want to put the files in different places, or just online some of the DB (say if you are trying to recover a table from an OS backup) then you'll need to mount but not open the DB and issue the appropriate 'alter database rename/drop...' commands. There is a White Paper on the Oracle website about this.

-If we were to do an Export and then an Import, we have to pre-define the
DB structure on the test- -machine and then perform the import?

Can do. If you have an identical directory structure, all you need to do is create the database & the data dictionary. The import will then create all the tablespaces etc for you.

Cheers
Martin. Received on Thu Mar 18 1999 - 08:39:51 CST

Original text of this message

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