0

I imported a transport tablespace from source database to my target database using IMPDP command. After importing, my schema's default tablespace shows as USERS tablespace. But when I created that schema at my source database, on that time I mentioned its default tablespace and also its quota.

Why my imported tablespace not tagged with the schema when I perform IMPDP command with TRANSPORT_DATAFILES parameter?

For your understanding, I give my steps as following.

  1. Create tablespace on my target database.
  2. Create user and assign its default and quota tablespace with newly created tablespace.
  3. Create some table and insert some data to the schema.
  4. Alter tablespace to READ ONLY mode.
  5. Perform EXPDP using TRANSPORT_TABLESPACES parameter.
  6. Copy the tablespace related datafile to my target database.
  7. At my target database, create same schema without mentioning the default and quota tablespace name.
  8. Perform IMPDP using TRANSPORT_DATAFILES parameter.
  9. Alter tablespace to READ WRITE mode.
  10. Insert data and get ORA-01536: space quota exceeded for tablespace error.
  11. Export command: expdp system/sys123@localhost:1521/orcl directory=TEST_BKUP_TBLSPS_DIRECTORY DUMPFILE=transport_tablespace_dumpfile.dmp logfile=transport_tablespace_exp_log_1.log transport_tablespaces=TEST_BKUP_TBLSPC_EXPIMP.
  12. Import command: impdp system/sys123@localhost:1521/orcl directory=TEST_BKUP_TBLSPS_DIRECTORY DUMPFILE=transport_tablespace_dumpfile.dmp logfile=transport_tablespace_imp_log_1.log transport_datafiles='D:\app\administrator\oradata\TEST_BKUP_TBLSPC_EXPIMP_DBF1_DBF.DBF'.
4
  • 3
    The default tablespace is an attribute of the user, at a given database. The same goes for all quotas. The IMPort operation doesn't change the default tablespace of a user. Why don't you explicitly set the default tablespace and the quota for the user at the target database (at point 7)? Commented Aug 30 at 23:27
  • @DiegoFerruchelli as I import the transport tablesapce, so I only need to create user and my tablespace would be created from the dump file. And for transport tablespace import, target schema must be exist, as I know. Commented Sep 4 at 8:48
  • Then change the default and the quota LATER. What's the actual problem? Is the tablespace imported correctly (and are tables/indexes owned by the desired user)? Remember that tablespaces don't belong to a user. A user just has (or not) permissions (quota) for writing (in this case, more data) on a given tablespace. Commented Sep 4 at 21:37
  • @DiegoFerruchelli tablespace was imported correctly and the objects of this tablespace are also found to the target database. And my actual query is that, after import, why the transport tablespace doesn't tagged with the user as a default tablespace and quota tablespace? Commented Sep 5 at 10:49

1 Answer 1

1

I'll repeat and expand what I said in the comments.

A user can write to several tablespaces (he just needs to have the corresponding quota in the given tablespace, or the UNLIMITED TABLESPACE privilege).

A tablespace can be written by several users.

The user is not the owner of the tablespace. The default tablespace (for a given user) is just the tablespace where the objects (tables, indexes, partitions) of this user will be created when the user doesn't explicitly specifiy a different tablespace.

The Import operation doesn't change the default tablespace of a user. It also doesn't change the quotas.

If you want to assign a default tablespace, and quotas, for a given user, you have to do it manually (ALTER USER ... SET DEFAULT TABLESPACE ..., etc). In your scenario, you have to do it after the import.

That's it. This is intended behaviour. This is how it works.

2
  • I understand what you say. But for transportable tablespace import user doesn't tagged with the imported transport tablespace. For your understanding I give you my operation step with following link. Please take a look and give me some suggestion on it. drive.google.com/file/d/1gUg8IdDY2-93TeunA5h1Rw968NQVFN7s/… If this link a permission to access please feel free to let me know. Commented 15 hours ago
  • There's no such thing as "tagging" the user with the tablespace (or vice versa). For any kind of tablespace or operation. Please, read my answer again. Commented 13 hours ago

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.