Whenever I run expdp the export process fails with ORA-01950 or ORA-01536.
SQL> host expdp test/t full=y dumpfile=a.dmp directory=d
Export: Release 10.2.0.1.0 - Production on Saturday, 20 September, 2008 15:54:18
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
ORA-31626: job does not exist
ORA-31633: unable to create master table "TEST.SYS_EXPORT_FULL_05"
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.KUPV$FT", line 863
ORA-01950: no privileges on tablespace 'USERS'
Or,
ORA-31626: job does not exist
ORA-31633: unable to create master table "TEST.SYS_EXPORT_SCHEMA_01"
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.KUPV$FT", line 863
ORA-01536: space quota exceeded for tablespace 'USERS'
Cause of the Problem While exporting database objects a master table is created in the user's default tablespace. In above example in first case it is SYS_EXPORT_FULL_05 and in second case SYS_EXPORT_SCHEMA_01 under test schema. If user does not have quota on default tablespace then export operation fails.
Solution of the Problem
Check the default tablespace of user test by issuing,
SQL> select default_tablespace from dba_users where username='TEST';
DEFAULT_TABLESPACE
------------------------------
USERS
Solution 1)Grant sufficient quota to the default tablespace on user's default tablespace who is performing export operation. To do it as a dba user grant quota to test user in this example as is shown above error.
SQL>conn system/a
SQL>ALTER USER test QUOTA unlimited ON users;
If you don't want unlimited quota you can still give less for example 10M to default tablespace on user test like,
SQL>ALTER USER test QUOTA 10M ON users;
Solution 2)If user has quota on another tablespace then you can change the user default tablespace to another tablespace of test user.
To do this issue query from dba_ts_quotas to see on which tablespace user has sufficient quota,
SQL> select tablespace_name,username,bytes, max_bytes from dba_ts_quotas where username='TEST';
TABLESPACE_NAME USERNAME BYTES MAX_BYTES
------------------------------ ------------------------------ ---------- ----------
DATA TEST 65536 10485760
As on tabespace data user has quota you can then change user default tablespace by,
SQL>ALTER user test default tablespace DATA;
Now you can able to perform export operation as test user.
Thanks for the post. Issue Resolved
ReplyDelete