Using External PROCEDUREs (EXTPROC) Which Were Working on Another Version Fails With ORA-06520 ORA-06522

(Doc ID 340778.1)

Last updated on JULY 05, 2017

Applies to:

PL/SQL - Version and later
Generic UNIX
***Checked for relevance on 14-Jun-2017***


Using External PROCEDUREs which were working on another version of Oracle fails with one of the following errors:

Execution failed:
ORA-06520: PL/SQL: Error loading external library
ORA-06522: $ORACLE_HOME/bin/extprocEXTPROCNAME: fatal: wrong ELF class: ELFCLASS32
ORA-06512: at %sline %s

Other errors that could show up is:

ORA-06522: 0509-022 Cannot load module <>
0509-103 The module has an invalid magic number.

Exec format error
Bad magic number for shared library:
wrong ELF class: ELFCLASS64


Migrating an Oracle database from 32-bit to 64-bit
Migrating an Oracle database from 64-bit to 32-bit
Migrating an Oracle database from Oracle8i to Oracle9i
Migrating an Oracle database from Oracle9i to Oracle10g


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