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: How to create a "test" instance

Re: How to create a "test" instance

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 2000/05/16
Message-ID: <958453956.26056.0.pluto.d4ee154e@news.demon.nl>#1/1

Mike Adams <mikea_at_best.com> schreef in berichtnieuws 3920cf50$0$217_at_nntp1.ba.best.com...
> I used the export/import to create a "test" copy of a production database.
> The "test" instance has to reside on the same machine as the production
> instance. I executed the following procedure. Please let me know if this
> procedure is OK.
>
> 1) created a new "test" instance with the same tablespace names as the
> production instance. (The datafile names and allocations are different of
> course)
>
> 2) Ran a "FULL=Y" export from the production instance.
>
> 3) Ran a "FULL=Y" import into the "test" using the dump file created from
> step 2.
>
> I received quite a few error messages stating that objects already exist
> when it tried to create the tablespaces and system tables. It seems to
 have
> import all the objects that didn't already exist (ie. all the user
 objects).
>
> Is this the best (easiest) way to clone a production system on the same
> machine?
>
> Is it OK to get all those warnings regarding not being able to create the
> objects that already exist? (Or did I trash something in the "test"
> database?)
>
> Thanks in advance for any help you can provide!!!!
>
> PS. please 'cc' mikea_at_best.com as I'm not able to read newsgroups at
 work.
>
>

The best procedure to clone a database is (and as you don't specify your platform like many others I have to be vague, I'm not going to outline the procedure for both NT and Unix)

1 in the source database, issue alter database backup controlfile to trace in svrmgr
2 go to the user_dump_dest directory, find the corresponding trace file and edit it when necessary
3 create a new instance, using oradim (NT), or edit the oratab (Unix) 4 copy all the database files, and the init.ora making adjustments to init.ora
(changing all references to the source SID into the target SID) 5 set the SID to the target SID
6 run the trace file from step 2, and presto, that should be it.

If you want to do it using exp/imp
1 full exp
2 create a new instance
3 create the database, run catalog.sql and catproc.sql 4 run imp with ignore=Y

Hth,

Sybrand Bakker, Oracle DBA

PS I don't read this email address at work, post to the newsgroup or reply sybrand_bakker_at_hotmail.com Received on Tue May 16 2000 - 00:00:00 CDT

Original text of this message

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