Thursday, May 31, 2018

DataPump Export (EXPDP) Fails With Errors ORA-39126 ORA-06512 ORA-1950 (Doc ID 1531789.1)

In this Document
Symptoms
Cause
Solution
References


APPLIES TO:

Oracle Database - Enterprise Edition - Version 11.2.0.3 and later
Information in this document applies to any platform.
***Checked for relevance on 28-Aug-2014***

SYMPTOMS

DataPump export fails with the following errors:
Export: Release 11.2.0.3.0 - Production on Tue Nov 25 17:33:24 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning option
Starting "ORACLE"."EXP_EST_RDEDWP":  /******** parfile=exp_est_only.par
Estimate in progress using BLOCKS method...
ORA-39126: Worker unexpected fatal error in KUPW$WORKER.FETCH_XML_OBJECTS []
ORA-31642: the following SQL statement fails:
BEGIN "SYS"."DBMS_CDC_EXPDP".SCHEMA_CALLOUT(:1,0,1,'11.02.00.03.00'); END;
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
ORA-06512: at "SYS.DBMS_METADATA", line 1749
ORA-01950: no privileges on tablespace 'SYSAUX'
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
ORA-06512: at "SYS.KUPW$WORKER", line 8996
----- PL/SQL Call Stack -----
object      line  object
handle    number  name
c00000011cd3ce58     20462  package body SYS.KUPW$WORKER
c00000011cd3ce58      9028  package body SYS.KUPW$WORKER
c00000011cd3ce58     10935  package body SYS.KUPW$WORKER
c00000011cd3ce58     13698  package body SYS.KUPW$WORKER
c00000011cd3ce58      4633  package body SYS.KUPW$WORKER
c00000011cd3ce58      9753  package body SYS.KUPW$WORKER
c00000011cd3ce58      1775  package body SYS.KUPW$WORKER
c00000011caa2978         2  anonymous block
Job "ORACLE"."EXP_EST_RDEDWP" stopped due to fatal error at 17:33:41

CAUSE

If the Change Data Capture feature is in use, then Export Data Pump creates a temporary table to hold the information of the change tables, which is then exported from the source, in order to be imported into the target database.
The table is created in the schema that holds the change table and will be located in the SYSAUX tablespace. You can check which schema's are involved with the following.
1. Create an errorstack of the error ORA-1950 retrieved as below:
SQL> connect / as sysdba

SQL> alter system set events '1950 trace name ERRORSTACK level 3';
Then repeat the export with the system.
Turn off the event using:
SQL> alter system set events '1950 trace name ERRORSTACK off';
The trace file for the DW00 shows the following DML statements:
ORA-01950: no privileges on tablespace 'SYSAUX'
----- Current SQL Statement for this session (sql_id=c8tgknkym241j) -----
INSERT INTO "CDCSUB".CDC$_IMPVLDTAB_113404 VALUES ('EDM_STAGE_ORDERS', 4, NULL)
INSERT INTO "CDCPUB".CDC$_IMPVLDTAB_113701 VALUES (:"SYS_B_0", :"SYS_B_1", NULL);
Based on the cursor generated for ORA-1950, the issue is generated because users CDCSUB and CDCPUB do not have quota on tablespace SYSAUX. The schema names CDCSUB and CDCPUB are an example, and can be any schema that has the Change Data Capture active.
-- or: --
2. Alternatively, you can also query the following table and look for the schema names in the column change_table_schema:
SQL> select * from change_tables;

CHANGE_TABLE_SCHEMA            CHANGE_TABLE_NAME              CHANGE_SET_NAME                SOURCE_SCHEMA_NAME             SOURCE_TABLE_NAME              CREATED    CREATED_SCN C       PUB_ID
------------------------------ ------------------------------ ------------------------------ ------------------------------ ------------------------------ --------- ------------ - ------------
CDC                            EMP_CDC                        SYNC_SET                       SCOTT                          EMP                            10-DEC-14     14179663 B        94378
In this example the schema CDC would be responsible for the errors.

SOLUTION

Grant the required quota:
SQL> alter user CDCSUB quota unlimited on SYSAUX;

SQL> alter user CDCPUB quota unlimited on SYSAUX;
or for the second example:
SQL> alter user CDC quota unlimited on SYSAUX;

Then repeat the export.

REFERENCES

NOTE:454849.1 - ORA-1950 Or ORA-1536 During Full Or Schema Database Export
NOTE:19238.1 - OERR: ORA-1950 "no privileges on tablespace '%s'" Reference Note

No comments:

Post a Comment