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: Cloning a database

Re: Cloning a database

From: Ban Spam <ban-spam_at_operamail.com>
Date: Mon, 20 Aug 2001 01:59:52 GMT
Message-ID: <Xns9102C141E7E8DSunnySD@24.0.3.73>


marko mikulicic <marko_at_seul.org> wrote in news:3B80B659.9020401_at_seul.org:

> Ban Spam wrote:
>> marko mikulicic <marko_at_seul.org> wrote in
>> news:3B7F589A.5070701_at_seul.org: 
>> 
>> 

>>>Hello,
>>>
>>>I have Oracle 9i on linux glib2.2.2 kernel 2.4.3
>>>
>>>
>>>I created a little (400MB) database with dbca with no templates
>>>and after hours of swapping (I have 512 RAM) and many failures
>>>(the installer did not copy the STANDARD package).
>>>Creation from templates was too big.
>>>Somehow I managed to get it installed and now I don't want
>>>pass again all this. I want to test replication on a single host, just
>>>to learn how to do it, but I had not disk space to waste. Template
>>>creation doesn't allow to change the tablespace dimensions, so I
>>>thought that cloning that one with another name would do the job.
>>>
>>>But wich files do I need to copy ? (I know how to setup net stuff)
>>>Is the databasename stored inside the database itself ?
>>>
>>>I have a slow machine with much ram, but oracle can be a hog :-)
>>>
>>>Thanks in advance
>>>
>>>
>>>
>> 
>> Below is a SQL script that generate a Korne Shell script
>> which I use to clone any DB. FWIW "pandora" is my test box.
>> 
>> set pages 0 feedback off lines 255
>> spool clone-db.ksh
>> select 'rcp ' || file_name || ' pandora:' || file_name || ' &' from 
>> dba_data_files; select 'rcp ' ||      name || ' pandora:' ||      name
>> || ' &' from v $controlfile; select 'rcp ' || member    || ' pandora:'
>> || member    || ' &' from v $logfile; spool off
>> 
> 
> Can this database run on the same machine or will have conflicting 
> instance name ?
> 
> (If just coping would be necessary why just not recursiveliy copy the 
> database directory?)
> 
> 
> Marko
> 
> 

While it is possible to change the name of an instance, I consider it to me not worth while. In other words I have not been able to get a script that would do it for any arbitrary instance.

WRT recursive copy - I ALWAYS keep control files spread across multiple volumes.

FWIW - I have successfully used this on at least a half dozen different instances which contain an arbitrary number of datafiles, logfiles & control files.

With free advice you get what you paid for it. ;-)

Use at your own risk or reward. Received on Sun Aug 19 2001 - 20:59:52 CDT

Original text of this message

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