Re: Duplicating users and their objects

From: Ed Jennings <jennings_at_dca.net>
Date: 1996/09/27
Message-ID: <324C0D1D.2BDF_at_dca.net>#1/1


J L Joslin wrote:
>
> Reposting article removed by rogue canceller.
>
> On Fri, 20 Sep 1996 15:09:57 -0400, "Michael J. Hillanbrand II"
> <mjhii_at_pop.erols.com> wrote:
>
> >David Moore wrote:
> >>
> >> I'm setting up multiple Oracle users to perform parallel testing.
> >>
> >> After setting up the first user, I can use exp & imp to set up
> >> duplicate users, except that I want each user to have seperate
> >> tablespaces.
> >>
> >> Is there a way to tell imp which tablespaces I wish to use? I'm
> >> running these test on VMS and various flavors of Unix, so hopefully
> >> there's a portable way to do this. :-/
> >> --
> >> ======================
> >> David A. Moore
> >> d a v i d m o _at_ r o s s i n c . c o mAt least on unix you can hack at the export file. Be careful about the first (header) records in the file -
> >vi doesn't like them. I normally use a NoRows export when I fiddle with the file, then after importing things
> >the way I want them, export again - then import ignore=y.
> >--
> >__________________________________________________________________
> >Michael J. Hillanbrand II Dulcian, Inc.
> > Oracle Data Base Administration
> >Voice: 215-773-7307 Fax: 610-277-2966
> >mailto://mjhii_at_erols.com or mailto://mjh_at_salts.icpphil.navy.mil
> > Delaware Valley Oracle Users Group, Inc.
> > http://www.oug.com/OUG/DEVOUG/
> >Contact me for Newsletter ads, articles, book reviews & Website Info.
>
> Wouldn't it be just as easy or easier to just create the user with:
>
> CREATE USER USR1 IDENTIFIED BY USR1
> DEFAULT TABLESPACE USR1_TABLESPACE
> TEMPORARY TABLESPACE TEMP;
> GRANT CONNECT, RESOURCE TO USR1;
>
> and import the objects from USR0 to USR1? That's how I've gone about
> setting up schemas for users in different tablespaces.
>
> Jim Joslin

Why don't you use the INDEXFILE option on the import. It creates a DDL file of create statements for tables and indexes, without actually importing anything. You can then modify the file with 'vi' easily. Run the modified DDL scripts, then run the import again without the INDEXFILE option and with IGNORE=Y. This will put populate your tables in their current locations. It's great when you have different tablespaces for tables & indexes. Received on Fri Sep 27 1996 - 00:00:00 CEST

Original text of this message