ORA-04023 ERROR: PUBLIC.DBMS_HS_PASSTHROUGH@Dblink Could Not Be Validated Or Authorized When Used With a Gateway (Doc ID 1508100.1)

Last updated on JANUARY 18, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 11.1.0.6 to 11.2.0.4 [Release 11.1 to 11.2]
Information in this document applies to any platform.

Symptoms

You are using DG4ODBC 11.2.0.3 to connect to MySQL. A select using the gateway database link is successful from SQLPLUS but trying to compile a PL/SQL package that uses DBMS_HS_PASSTHROUGH or run from SQLPLUS gives the error ORA-04023.

For example -

SQL> DECLARE
 2  l_Result INTEGER;
 3  BEGIN
 4  l_Result := DBMS_HS_PASSTHROUGH.EXECUTE_IMMEDIATE@mysql('CALL TEST');
 5  END;
 6  /
DECLARE
*
ERROR at line 1:
ORA-04023: Object PUBLIC.DBMS_HS_PASSTHROUGH@MYSQL could not be
validated or authorized

 

or -

SQL> create or replace procedure test_proc_rem
 2  as
 3  l_Result INTEGER;
 4  BEGIN
 5  l_Result := DBMS_HS_PASSTHROUGH.EXECUTE_IMMEDIATE@mysql('CALL TEST');
 6  END;
 7  /

Warning: Procedure created with compilation errors.

 

Show errors will return information similar to -

 

Compilation errors for test_proc_rem

Error: ORA-04023: Object PUBLIC.DBMS_HS_PASSTHROUGH@MYSQL.DDM001.COM could not be validated or authorized
Line: 1
Text: create or replace procedure test_proc_rem

 

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