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: Database Cloning

Re: Database Cloning

From: Yurasis Dragon <yurasis_spamNOSPAM_at_yahoo.com>
Date: Fri, 13 Oct 2000 11:23:06 -0600
Message-ID: <augeuscjvcpn229b4p8d8eqpkq5bvg8r4d@4ax.com>

Yes, I think this method (db link and CTAS) is the best one to use, given the db size problems mentioned earlier.

I do this all the time, just make a shell db, with parallel tablespaces and sizes as the source db. Just export the source db with rows=n so get the other objects (indexes, functions, constraints, procedures, etc.) and import it into the destination db after you create the tables. Try running this script (or something like it) in the source db for each schema to migrate to the new db, spool the output to another script and run it in the destination db, using the correct db link name :

select 'create table ' || segment_name,

'tablespace ' || tablespace_name,
'storage (initial ' || bytes || ' next ' || next_extent || ')',
'as select * from ' || segment_name || '@prod_pidm;'
from user_segments
where segment_type = 'TABLE';

On Sat, 7 Oct 2000 10:11:25 +0100, "Jonathan Lewis" <jonathan_at_jlcomp.demon.co.uk> wrote:

>
>This is extremely unlikely to work across platforms.
>as different logical data structures often change into
>different byte sets with different byte orders as you
>do the move. Have a look at v$type_size for an indication
>of how different the two platforms may be.
>
>One possible, but tedious, option that can be faster
>than export/import is to set up database links between
>the two databases and execute:
> create table xyz
> nologging etc.
> as
> select * from xyz_at_sun_database;
>
>Then do an export/import of structure to sort
>out privileges etc.
Received on Fri Oct 13 2000 - 12:23:06 CDT

Original text of this message

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