Re: Oracle 10g database exp and imp question

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 21 Mar 2005 01:25:38 -0800
Message-ID: <1111397138.908879.5830_at_l41g2000cwc.googlegroups.com>


Faroch Hordil wrote:
> Hi, I am reading document B10825-01.pdf Oracle Database Utilities,
chapter
> 20 "Original Export and Import". I am an aspiring DBA but not a DBA.
>
> My understanding from B10825-01.pdf is that to export all the tables,
stored
> procedures etc for SCOTT, I would use this:
>
> exp system/password_at_db10gtest rows=y owner=scott
>
> I have tried this it creates a file EXPDAT.DMP
>
> I then do this:
>
> SQLPLUS system/password_at_db10gtest
> DROP USER SCOTT CASCADE;
>
> and SCOTT is deleted.
>
>
> To test the import, I now want to put SCOTT and all his data, stored
> procedures etc back as they were before I deleted them. I am
attempting to
> do this with "imp".
>
> I have typed this
>
> imp system/password_at_db10gtest full=y
>
>
> and I get a few errors including this
>
> ORA-01435: user does not exist
>
> When I create user SCOTT using CREATE USER SCOTT IDENTIFIED BY
PASSWORD and
> then do the imp again everything is imported. But I don't want to
create him
> beforehand, I want the user to be created if it does not exist during
the
> import. According to B10825-01.pdf (page 20-19), user definitions are
only
> imported in "FULL DATABASE MODE". This is why I have added "full=y"
in the
> imp line above. But it still doesn't import the user if it don't
exist in
> the first place.
>

<snip>

Using old style exp/imp in 10g,

Unless you do export in FULL mode, how do you expect to do import in FULL mode... like what you are trying to do? It may be confusing a bit but that is precisely what the docco means... user definitions are only imported if both export and import are done in FULL mode. I am afraid you would have to create the user in the target database if you want to only do schema level export/import.

Regards
/Rauf Received on Mon Mar 21 2005 - 10:25:38 CET

Original text of this message