end loop;
end;
/
returns following expected
Output
ERROR at line 3:
ORA-06550: line 3, column 15:
PL/SQL: ORA-04063: view "SCOTT.X_VIEW" has errors
ORA-06550: line 3, column 1:
PL/SQL: SQL Statement ignored
ORA-06550: line 2, column 8:
PLS-00341: declaration of cursor 'C_USER_OBJECTS' is incomplete or malformed
ORA-06550: line 4, column 16:
PL/SQL: Item ignored
ORA-06550: line 8, column 29:
PLS-00364: loop index variable 'R_USER_OBJECTS' use is invalid
ORA-06550: line 8, column 8:
PL/SQL: Statement ignored
Cause
This is expected behavior in all versions, since code need to be created on the remote READ ONLY Database, for
each time issued a new version need to be created, which cause the problem.
There is an Enhancement Request raised for this in
Bug 2033385 SELECT FROM A VIEW IN A READ-ONLY DB USING A DBLINK WITHIN A CURSOR LOOP FAILS
SolutionCreate the VIEW on local Database.