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: Using COPY to rebuilding database.

Re: Using COPY to rebuilding database.

From: Jim Gregory <jim.gregory_at_internetaddress.com>
Date: 1997/08/08
Message-ID: <EEM3nI.75q@ranger.daytonoh.ncr.com>#1/1

How about

create target schema with target default tablespace. Grant select on system.<tables> to <new schema>. Log into new schema.

create <table1> as select * from system.table1; create <table2> as select * from system.table2;

etc.

Then drop all of the system.<tables>

most of this can be set up by using SQL to generate other SQL statements to do the actual work.

==========Timothy J. Stevens, 8/8/97==========

I was recently asked how to rebuild a database where all of the tables had been created in the SYSTEM tablespace. The only scheme I could think of was to use the COPY command to create the tables in another database in separate tablespaces, drop the old database and then rename the new database back to the original name. Does any have any experience with this problem and will my little scheme work. Alternatively, is there a better way to do this

Thanks!

Expressed views and opinions are mine
and do not reflect those of my employer or clients

Jim Gregory Received on Fri Aug 08 1997 - 00:00:00 CDT

Original text of this message

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