My Oracle Support Banner

DG4ODBC 11.2 ORA-12012 Scheduled Job Fails To Execute Over DBlink To SQL Server (Doc ID 1459985.1)

Last updated on SEPTEMBER 20, 2021

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.1 to 11.2.0.3 [Release 11.2]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.

Symptoms

.
A stored procedure in Scheduled Jobs has a database link to SQL Server.
This procedure is run using the Oracle Database Gateway for ODBC (DG4ODBC) 11.2.0.3 running on Microsoft Windows (32-bit)
The procedure can be executed successfully with DBMS_SCHEDULER.RUN_JOB('procedure_name');

but fails when you use  DBMS_SCHEDULER to run the job at a later date.

Error messages will appear in the alert.log

Errors in file D:\APP\ORACLE_HOME\trace\trace.trc:
ORA-12012: error on auto execute of job "owner"."procedure_name"
ORA-20004: PROCEDURESTART ERROR: DBLink Execute Failure for the following:  select "Column" from dbo.table@dblink
ORA-06512: at "owner.PROCEDURESTART", line 301
ORA-20004:
ORA-28513: internal error in heterogeneous remote agent
ORA-02063: preceding line from dblink
ORA-06512: at line 1

In the trace file listed in the alert.log

Trace file D:\APP\ORACLE_HOME\trace\trace.trc

 
ORA-12012: error on auto execute of job "owner"."procedure_name"
ORA-20004: PROCEDURESTART ERROR: DBLink Execute Failure for the following:  select "Column" from dbo.table@dblink
ORA-06512: at ""owner.PROCEDURESTART"", line 301
ORA-20004:
ORA-28513: internal error in heterogeneous remote agent
ORA-02063: preceding line from dblink
ORA-06512: at line 1

Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.