Hi, Tom.
I'm experiencing a strange problem.
In database A i got package that uses dblink inside it, just to open cursors. So
select * from dba_dependencies
№ OWNER NAME TYPE REFERENCED_OWNER REFERENCED_NAME REFERENCED_TYPE REFERENCED_LINK_NAME
DEPENDENCY_TYPE
1 SPARE_EXT EXT_LOAD_PKG PACKAGE BODY OPER_1 STATUS_DESC TABLE LNK_01 HARD
2 SPARE_EXT EXT_LOAD_PKG PACKAGE OPER_1 STATUS_DESC TABLE LNK_01 HARD
3 SPARE_EXT EXT_LOAD_PKG PACKAGE BODY OPER_1 APPLICATION_cl TABLE LNK_01 HARD
...
No ddl operations are performed on database B (through LNK_01).
I switched on ddl auding on OPER_1, and have found nothing.
AUDIT TABLE,ALTER TABLE BY ACCESS;
But when i try to recompile SPARE_EXT.EXT_LOAD_PKG, it successfuly recompiles and after couple of seconds becomes invalid again.
What is the issue?
Thx in advance.
Database A
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE 11.2.0.4.0 Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
Solaris 11 SPARC
Database B
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
Solaris 11 SPARC
Do you see the issue if you build a small test case, eg (pseudo code)
package body PKG
procedure P is
rc sys_refcursor;
begin
open rc for select ... from table@dblink;
end;
I'm suggesting - start with something very simple and slowly evolve it into your real code, and see if you find a "tipping point", ie, where it starts to show the behaviour.
I know this isnt an "answer", but keep us posted with reviews and we'll keep exploring