At an import of data and stored procedure in a (quite empty) Oracle XE 18 database, we have (sporadically - around 80%) this error - a part of the stdout:
...
Completed 3 ALTER_FUNCTION objects in 0 seconds
W-1 Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
ORA-39083: Object type ALTER_PROCEDURE:"<USER>"."<SP_METHOD_NAME>" failed to create with error:
ORA-04052: error occurred when looking up remote object <COMPANY_VIEWS>.<VIEW_NAME>@<REMOTE_DB_LINK_NAME>
ORA-00604: error occurred at recursive SQL level 3
ORA-12564: TNS:connection refused
Failing sql is:
ALTER PROCEDURE "<USER>"."<SP_METHOD_NAME>" COMPILE PLSQL_OPTIMIZE_LEVEL= 2 PLSQL_CODE_TYPE= INTERPRETED PLSQL_DEBUG= FALSE PLSCOPE_SETTINGS= 'IDENTIFIERS:NONE' NLS_LENGTH_SEMANTICS= BYTE REUSE SETTINGS TIMESTAMP '2022-10-17 09:27:29'
W-1 Completed 19 ALTER_PROCEDURE objects in 4 seconds
....
But when I browse to the failed stored procedure "<USER>"."<SP_METHOD_NAME>" in an SQL developer I can compile it always without any problem. And according to the error messages above it seemed to have failed 3 times consecutively.
PS: the database runs in a docker container, the referenced database somewhere else in the company network.
PS: I checked also:
impdp fails via database link (0 Bytes)
What could help?