Start of change

-512   STATEMENT REFERENCE TO REMOTE OBJECT IS INVALID

Explanation

One of the following conditions exists:

  • The statement refers to multiple locations.
  • A statement with a remote reference is being EXPLAINED either by a dynamic EXPLAIN statement or the EXPLAIN(YES) option.
  • An alias is used incorrectly.
  • A three-part name is implicitly or explicitly used in a statement that is not supported by the DB2® private protocols.
  • A three-part name is implicitly or explicitly used in a triggered statement.
  • A PREPARE statement contains an ATTRIBUTES clause. This is not supported by the DB2 private protocols.
  • A three-part name with a remote reference is not allowed in a body of an SQL function.

System action

The statement cannot be processed.

Programmer response

If the object cannot be meaningfully eliminated from the statement, see your database administrator for other ways to obtain the data required.

If the remote object reference is in a triggered SQL statement, you can instead invoke a user-defined function or a stored procedure from the trigger and access the remote object from the function or stored procedure.

SQLSTATE

56023

End of change