The DBMS_APP_CONT
package provides an interface to determine if the in-flight transaction on a now unavailable session committed or not, and if the last call on that session completed or not.
See Also:
Oracle Database Development Guide for explanations of application continuity and Transaction Guard, and the relationship between these two features:This chapter contains the following topics:
Overview
Security Model
One of the fundamental problems for recovering applications after an outage is that the commit message that is sent back to the client is not durable. If there is a break between the client and the server, the client sees an error message indicating that the communication failed. This error does not inform the application whether the submission executed any commit operations or if a procedural call, ran to completion executing all expected commits and session state changes or failed part way through or yet worse, is still running disconnected from the client.
The purpose of the GET_LTXID_OUTCOME Procedure is to determine if the in-flight transaction on a now unavailable session completed or not. It is used when the original session returned an error due to unavailability. Situations that can cause such session unavailability may occur at the session, instance, server, or network, and result from planned or unplanned outages. When such an outage occurs, the application receives a disconnection error. Such an error provides no insight as to whether the transaction committed. It also does not reveal what the application might have been expecting from that commit if it had returned.
Table 21-1 DBMS_APP_CONT Package Subprograms
Subprogram | Description |
---|---|
Lets customer applications and third party application servers determine the transactional status of the last session when that session becomes unavailable. |
This procedure lets customer applications and third party application servers determine the transactional status of the last session when that session becomes unavailable.
DBMS_APP_CONT.GET_LTXID_OUTCOME ( client_ltxid IN RAW, committed OUT BOOLEAN, user_call_completed OUT BOOLEAN)
Table 21-2 GET_LTXID_OUTCOME Procedure Parameters
Parameter | Description |
---|---|
|
Client-side logical transaction ID. Obtain the |
|
Returns |
|
Whether all information has been returned to the client. Examples of such messages are the number of rows processed when using autocommit or commit on success, parameter and function results when calling PL/SQL, or PL/SQL with more work to do after the |
Table 21-3 GET_LTXID_OUTCOME Procedure Exceptions
Exception | Description |
---|---|
|
The server is ahead so the transaction is both an old transaction and one which has already committed. This is an error as the application is passing an older |
|
The client is ahead of the server. This can happen if the server has been flashed backed, recovered using media recovery, or is a standby that has opened earlier with data loss. |
|
Executing |
|
Your session has been blocked from committing by another user with the same username using |
|
The outcome cannot be determined. During processing an error happened. The error stack shows the error detail. |