From: Jim Gregory <jim.gregory@internetaddress.com>
Subject: Re: Using COPY to rebuilding database.
Date: 1997/08/08
Message-ID: <EEM3nI.75q@ranger.daytonoh.ncr.com>#1/1
Sender: news@ranger.daytonoh.ncr.com (News Administrative Login)
X-Nntp-Posting-Host: 149.25.54.205
References: <331B8C12F509FF49.CF3F2311233C3C28.1F28B7DA4AC916DC@library-proxy.airnews.net>
Organization: NCR
Reply-To: jim.gregory@internetaddress.com (gregoj)
Newsgroups: comp.databases.oracle.server



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


