Saturday, July 9, 2011

Data pump export fails with ORA-31626 ORA-31650 if SGA_TARGET is set low

Problem Description
Data pump export fails with ORA-31626 and ORA-31650 error like below.
$./expdp.sh APPDB 3 Y ALL
ERROR MSG: ./expdp.sh FAILED WITH AN ORACLE (EXP) ERROR ON HOST app-db
LOG FILE: /backup/APPDB/logs/expdp_18146.log
RC: 1
From the logfile,
$ cat /backup/APPDB/logs/expdp_18146.log

INVOKING DATABASE BACKUP Sun, 10 Jul 2011 01:34:12.


Export: Release 10.2.0.4.0 - 64bit Production on Sunday, 10 July, 2011 1:34:12

Copyright (c) 2003, 2007, Oracle. All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Data Mining and Real Application Testing options
ORA-31626: job does not exist
ORA-31650: timeout waiting for master process response


DATABASE BACKUP COMPLETE 01:34:15. EXPORT FILE APPDB_20110710_013412.dmp

./expdp.sh FAILED WITH AN ORACLE (EXP) ERROR. SYNOPSIS WRITEN TO STDOUT FOR LSF. EXIT WITH RC=1

exit 1

Cause of the Problem
A similar error you will notice in http://arjudba.blogspot.com/2010/12/ora-31626-ora-31650-while-using-oracle.html which talks about solution in RAC environment. If that is not the case and that workaround does not solve your problem then the possible problem is low amount of SGA in your Oracle database.

Solution of the Problem
Check the amount of sga_target in your environment by,

SQL> show parameter sga_target

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
sga_target big integer 300M

SQL> show parameter sga_max_size

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
sga_max_size big integer 352M

Increase the size of SGA_MAX_SIZE and SGA_TARGET and try export again.

SQL> alter system set SGA_MAX_SIZE =1024M scope=spfile;

SQL> shutdown immediate

SQL> startup

SQL> alter system set SGA_TARGET =1024M scope=both;

And then run the export again.