Data Pump ATTACH Command Reports ORA-31626 ORA-06502 If JOB_NAME >= 30 Bytes (Doc ID 821899.1)

Last updated on JANUARY 16, 2011

Applies to:

Oracle Server - Enterprise Edition - Version: 10.2.0.4 to 11.1.0.7 - Release: 10.2 to 11.1
Information in this document applies to any platform.

Symptoms

-- Problem Statement:

The Oracle Documentation Utilities manual specifies that a Datapump JOB_NAME can be as long as 30 bytes long:
-------------------------------
Syntax and Description:

JOB_NAME=jobname_string

The jobname_string specifies a name of up to 30 bytes for this export job."
----------------------------------------------------------------------------------------------------------

When a JOB_NAME is created using more than 30 bytes, Datapump will truncate the JOB_NAME to only the first 30 bytes.

For example the following job_name is greater than 30 bytes (32 bytes long):

>expdp sh/sh job_name=shexp91113151719212325272931test directory=EXP

If we select from dba_datapump_jobs, we see that the JOB_NAME has been truncated:


SQL> select job_name, length(job_name) from dba_datapump_jobs;

JOB_NAME                                             LENGTH(JOB_NAME)
------------------------------------------------------------------------------------------------------
shexp91113151719212325272931te                 30

However, if we use the ATTACH command of Datapump with a JOB_NAME that is 30 bytes long, this will also raise ORA-6502, despite the JOB_NAME having length = 30 bytes.

>expdp sh/sh attach=shexp91113151719212325272931te

Export: Release 10.2.0.3.0 - 64bit Production on Friday, 08 May, 2009 14:01:21

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

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit
Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
ORA-31626: job does not exist
ORA-06502: PL/SQL: numeric or value error: character string buffer too small



Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms