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: Questions about cloning an instance

Re: Questions about cloning an instance

From: Howard J. Rogers <howardjr_at_www.com>
Date: Thu, 29 Mar 2001 23:28:00 +1000
Message-ID: <3ac3387b@news.iprimus.com.au>

"Greg Akins" <insomnia_at_cvzoom.net> wrote in message news:3ac33147$1_3_at_corp.newsfeeds.com...
> You know I always hate when people post questions that have obvious
 answers
> if they had only read the documentation. Doh! I did read the pages, I
 just
> didn't think about them that hard before making that post. Sorry... Worse
> yet, I think I actually answered my own questions in the same post:')
>
> OK. I am guessing that I use the 'Create Controlfile...' since I'm not
> creating a database, but only reusing an existing one. And if I don't use
> the same db_block_size, then the datafiles would be unusable.
>
> Thanks again, sorry for being so dense.

Hi Greg,

I honestly don't see the need to guess at all! Follow the steps 1 to 6 at the top of that document, and you will have a functioning clone. Just in case, those steps are:

  1. Issue 'backup controlfile to trace' command in primary database, then do a clean shut down
  2. Copy source data files and online redo logs to a clone destination (check file permissions)
  3. Copy primary init.ora and the trace file to somewhere appropriate
  4. Edit the cloned init.ora so that file locations are pointing somewhere appropriate (eg, archives, trace files, control files)
  5. Edit the trace file: strip out rubbish at top, stick in a 'connect ... as sysdba', add a 'startup pfile='location of cloned init.ora', change all file locations so that they point to where your clone copies have already been made.
  6. Startup server manager
  7. Run edited trace file.

That gets you a clone with the same database name and Instance name as the (currently shutdown) primary. To be able to open the primary, you'll need to change the Instance name of the clone (which is done by starting it up having previously changed the ORACLE_SID environment parameter).

If you want to change the database name (which isn't strictly necessary), then the steps are also provided in that document. It involves issuing a fresh 'backup controlfile to trace' in the clone, and changing the 'reuse BLAH noresetlogs' entry to 'set NEWBLAH resetlogs'.

And having said all of that, I have just re-read your original post, and realise that your primary and clone will be on two different boxes. It's therefore entirely unnecessary to rename either the Instance or the database itself, since there is no possibility of name conflict, and little liklihood of confusion about which one is production and which is the clone. I've also assumed in all of this that the clone machine has Oracle already installed correctly on it.

Regards
HJR
>
> -greg
>
>
> "Howard J. Rogers" <howardjr_at_www.com> wrote in message
> news:3ac32876_at_news.iprimus.com.au...
> >
> > "Greg Akins" <insomnia_at_cvzoom.net> wrote in message
> > news:3ac314f3_3_at_corp.newsfeeds.com...
> > > And one other question. Does this force me to have the same
 db_block_size
> > > as the old database?
> > >
> >
> > Did you in fact read the document that I pointed you to?
> >
> > If you did, you should be able to answer your own question.
> >
> > But just in case not.... you've copied the datafiles, right? Datafiles
 are
> > made up of Oracle blocks. The block size they contained was that
 specified
> > for the primary database.
> >
> > So, what do you think?
> >
> > Regards
> > HJR
> >
> >
> >
> >
> > > -greg
> > >
> > > "Greg Akins" <insomnia_at_cvzoom.net> wrote in message
> > > news:3ac30919_4_at_corp.newsfeeds.com...
> > > > OK...clone a database. It looks relatively simple. I am going to a
> > > > different box, with one disk (It's just for testing) and Win2000.
 Will
 that
> > > > make much of a difference. It doesn't appear so.
> > > >
> > > > A couple things I'm a little wary of. First of all, I know that I
 can
 edit
> > > > the controlfile trace to a 'Create database' command. Is this what
 I
 want
> > > > to do, or am I simply editing it to create a different controlfile?
> > > >
> > > > So, walking through the startup...
> > > >
> > > > 1. Nomount - just needs a minimal init.ora
> > > > 2. mount - Needs a controlfile (which can be created by the 'Alter
 Database
> > > > Backup Controlfile to trace'
> > > > Use the Create Controlfile statement and edit the file locations
> > > > appropriately.
> > > > 3. open - Will work if a valid copy of the datafiles are in the
 appropriate
> > > > place.
> > > >
> > > > Seems simple enough. Wish me luck.
> > > >
> > > > Thanks for the the help.
> > > >
> > > > -greg
> > > >
> > > > "Howard J. Rogers" <howardjr_at_www.com> wrote in message
> > > > news:3ac19f36_at_news.iprimus.com.au...
> > > > > You might care to peruse
> > > > > http://www.geocities.com/hjroz2000/clonedatabase.txt where the
 subject
 is
> > > > > documented at length. The replies I've seen posted here will have
 your
 new
> > > > > database sending archives into the same directory as the
 production
 database
> > > > > (assuming the source database is in archivelog mode), amongst
 other
 nasty
> > > > > gotchas.
> > > > >
> > > > > Incidentally, you don't clone an 'Instance'. You clone a
 database.
> > > > >
> > > > > Regards
> > > > > HJR
> > > > >
> > > > >
> > > > >
> > > > > "Greg Akins" <insomnia_at_cvzoom.net> wrote in message
> > > > > news:3ac104e6_3_at_corp.newsfeeds.com...
> > > > > > Hello,
> > > > > >
> > > > > > I am setting up a test server which need to mimic a production
 oracle
 8i
> > > > > > database.
> > > > > >
> > > > > > From a highlevel perspective I believe I have to
> > > > > >
> > > > > > 1. Create the instance with an init.ora similar to the
 production
> > > > > > (differences for SGA settings only?)
> > > > > > 2. Create a script to recreate the users and tablespaces?
 Tablespace
 can
> > > > > > be the same, but the test box only has one disk, so Datafile
 locations
 will
> > > > > > be different.
> > > > > > 3. Full Export from Production and import to Test.
> > > > > >
> > > > > > Am I missing anything? Any suggestions would be appreciated.
> > > > > >
> > > > > > -greg
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> > > > > > http://www.newsfeeds.com - The #1 Newsgroup Service in the
 World!
> > > > > > -----== Over 80,000 Newsgroups - 16 Different Servers! =-----
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > > -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> > > > http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> > > > -----== Over 80,000 Newsgroups - 16 Different Servers! =-----
> > >
> > >
> > >
> > >
> > > -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> > > http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> > > -----== Over 80,000 Newsgroups - 16 Different Servers! =-----
> >
> >
>
>
>
>
> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> -----== Over 80,000 Newsgroups - 16 Different Servers! =-----
Received on Thu Mar 29 2001 - 07:28:00 CST

Original text of this message

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