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 9.2.0.8 and later
Generic UNIX
***Checked for relevance on 14-Jun-2017***



Symptoms

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: ld.so.1: $ORACLE_HOME/bin/extprocEXTPROCNAME: fatal: SHARED_LIBRARY.so: wrong ELF class: ELFCLASS32
ORA-06512: at %sline %s


Other errors that could show up is:

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

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



Changes

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

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