-30047 STATEMENT FAILED BECAUSE OBJECT OF TYPE resource-type-code CANNOT BE ACCESSED USING DIFFERENT DISTRIBUTED PROTOCOLS ON A CONNECTION FROM server-name-1 TO server-name-2

Explanation

Start of changeSQL statements that reference objects with resource type resource-type-code cannot be processed in the following cases:End of change

  • The same connection between server-name-1 and server-name-2 uses both application-directed access and system-directed access.
  • Use of application-directed access and system-directed access are mixed in the application.
Start of changeresource-type-codeEnd of change
Start of changeThe type code for the resource that could not be accessed. See Resource types for messages and codes in Db2 for z/OS for the type of resource that is associated with each type code.End of change
server-name-1
The name of the server that attempted to access the object. Up to 16 characters of the server name are displayed.
server-name-2
The name of the server from which the definition of the object was used to create an instance of the object on server-name-1. Up to 16 characters of the location name are displayed.

System action

The statement cannot be processed.

Programmer response

If the application is controlled by a plan bound at a Db2 for z/OS® requester, and the application performs commits or rollbacks before any change in the distributed protocol used by the application, the plan should be rebound with the DISCONNECT bind option set to AUTOMATIC or CONDITIONAL. This will permit the requester to automatically terminate any remote server connection during commit or rollback processing.

If the application is not controlled by a plan, SQL RELEASE statements should be executed before a commit or rollback statement so that remote server connections can be terminated before the application changes distributed protocols. Because the introduction of extra commit or rollback statements into an application can jeopardize the data integrity of the application, the application and any stored procedures it invokes should be changed to use the same distributed protocol for remote SQL statement processing.

SQLSTATE

58008