Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: What is different b/w exp tablespace and exp user
aman.oracle.dba wrote:
> Hi,
>
> If I export full tablespace with the command
> exp userid=system/manager owner=hr
>
> and then imp in other database
> imp userid=system/manager fromuser=hr
> touser=hr ignore=y
>
> (Some same tables exists there but without data)
> or
> If I export tablespace with the command
> exp userid=system/manage tablespaces=users
>
> and then imp in other database
> imp userid=system/manager tablespaces=users
> ignore=y
>
> Both user and tablespace with the same name exists there and user "HR"
> is the only user who is using tablespace "USERS".
> So what is difference between both (WITH OWNER and TABLESPACE) exp and
> imp.
>
>
> As well as what will the difference if some tables already exists in
> user "HR" or Not Exists.
>
What if user HR has a table stored in tablespace MY_DATA? What if tablespace USERS also contains tables owned by user SCOTT?
When you export with OWNER, you get all of that user's objects, regardless of the tablespace those objects may be in. Additionally, you get non-segment objects such as sequences, views, procedures, etc.
When you export with TABLESPACE, you get all of the objects in that tablespace, regardless of the owner. You may not get all of a user's objects since some may be in another tablespace or may be in no tablespace (except the data dictionary).
HTH,
Brian
-- =================================================================== Brian Peasland dba_at_nospam.peasland.net http://www.peasland.net Remove the "nospam." from the email address to email me. "I can give it to you cheap, quick, and good. Now pick two out of the three" - UnknownReceived on Tue Oct 31 2006 - 13:35:47 CST