Transaction Guard and Application Continuity are two new enterprise solutions for managing the availability of applications in a distributed environment. Application Continuity allows enterprises to ensure that critical applications will continue to be available even when one or more of the servers or databases that support the application fails. Transaction Guard allows distributed applications to continue to execute transactions even if disasters should cause network communication to fail.
The goal of Transaction Guard and Application Continuity (hereinafter: TxGAC) is to provide the means to ensure transaction atomicity in the presence of external data consistency failures. TxGAC gives the application the ability to declare a memory region to be either protected from failure, or not protected. If an external failure is detected on a protected memory region, the transaction is restarted.
Introduction to transaction monitoring and application continuity
Oracle Database 12c introduces two basic features to ensure application continuity after a database failure:
- A reliable way for applications to know the result of transactions
- Ability to mask failures by reconnecting to the database and replicating the workload
These features are provided by two new functions: Transaction monitoring and application continuity.
- Transaction Guard is an API that applications use for error handling. This is a new and reliable way to return the result of the last transaction after a recoverable error has occurred. Transaction Guard itself can greatly improve the end user experience by removing the doubt as to whether or not the last transaction was passed.
- Application continuity is a feature that masks recoverable end-user and application errors. Application continuity attempts to replicate the transactional and non-transactional work that makes up a database query. If the read is successful, the end user will perceive the interruptions as if the execution was slightly delayed. With application continuity, the end user experience improves because they never know when an error has occurred. In addition, application continuity can simplify application development by removing the burden of repairable failures.
What is Transaction Guard?
Transaction Guard is a robust protocol and API that applications use to ensure that results are captured securely. The API is normally integrated with error handling and should be called after recoverable errors occur. The result indicates whether the last operation was recorded and completed. Once the result of the transfer is returned to the application, the result is saved. So, if Transaction Guard returns committed or uncommitted, the status remains the same. This allows the application or user to act with confidence.
Transaction Guard is used by Application Continuity and is automatically activated by it, but you can also activate it yourself. Transaction Guard prevents a transaction played by Application Continuity from being reapplied more than once. If application-level replay is implemented in the application, integration with Transaction Guard can be used to ensure transaction idiocy, i.e., multiple execution of a transaction has the same result as its single execution.
Benefits of Depository Transactions
Transaction Guard is a powerful feature. Benefits include:
- In applications that include Transaction Guard, users can find out what happened to their last shipment and move forward with confidence and security. Without Transaction Guard, hesitation after an error can cause the database to be queried again, which can lead to logical corruption.
- Because Transaction Guard is integrated into the database core, it offers better performance and reliability than embedded idempotent code.
How Transaction Guard works
With a standard commit, the database records the transaction and sends a success message to the client. In the figure above, the client sends a validation statement and receives a message that the connection has failed. This type of error can occur for a variety of reasons, for example. For example, as a result of a database instance failure or a network failure. In this scenario, without Transaction Guard, the client does not know the outcome of the transaction.
Oracle Database solves this problem by using a globally unique identifier called the Logical Transaction Identifier (LTXID). When the application runs, both the database and the client store a logical transaction ID. The database provides a logical transaction identifier to the client at authentication and at each pass through the client driver, which performs one or more validation operations.
When a recoverable error occurs, the logical transaction identifier uniquely identifies the last database transaction that was represented in the failed session. The new PL/SQL interface (DBMS_APP_CONT.GET_LTXID_OUTCOME) provides a reliable commit result.
Use of custodial resources for transactions
You can use Transaction Guard for any database on your system, including restarting and switching between single instance databases, Real Application Clusters, Data Guard, and Active Data Guard.
Transaction Guard is supported in the following Oracle Database 12c configurations:
- Oracle single instance RDBMS
- Real application clusters
- Data protection
- Active data backup
- Multi-tenant, including disconnect/connect and for 12.2 relocation via PDB/CDB, but excluding the clone option.
- Global Data Services for the above mentioned database configurations
Transaction Guard supports all of the following transaction types.
- Local engagement
- Automatic commitment and obligation in case of success
- Commit integrated into PL/SQL
- DDL, DCL and parallel DDL
- Distributed remote assembly
- XA transactions with single-stage optimizations
The major exceptions in Oracle Database12c version 12.2 are:
- XA two-phase
- Active Data Guard with links to the database for read/write with another database
To enable Transaction Guard, set the COMMIT_OUTCOME=TRUE service attribute. If necessary, modify the RETENTION_TIMEOUT service attribute to indicate how long the validation result should be kept. The value of the wait time is specified in seconds; the default value is 86400 (24 hours), the maximum value is 2592000 (30 days).
Transaction Guard supports the following client drivers:
- JDBC 12c type 4 driver
- OCI and OCCI 12c client drivers
- 12c Oracle Data Provider for .NET (ODP.NET), unmanaged driver
- 12c ODP.NET, managed driver in ODAC 12c Release 4 or higher
Create services for Transaction Guard
To enable Transaction Guard but not Application Continuity, create a service with SRVCTL and set only-commit_outcome to TRUE.
srvctl add service -db racdb -service app3 -serverpool Srvpool1 -commit_outcome TRUE -retention 86400 -failoverretry 30 -failoverdelay 10 -notification TRUE -rlbgoal SERVICE_TIME -clbgoal SHORT
You can use SRVCTL to modify an existing service to enable Transaction Guard, similar to the following command, where racdb is the name of your Oracle RAC database and app2 is the name of the service you are modifying:
srvctl modify service -db racdb -service app2 -commit_outcome TRUE -retention 86400 -notification TRUE
In the previous example, the -retention parameter specifies the length of time (in seconds) that the history is retained. In addition, the -notification parameter is set to TRUE, allowing FAN events. To use Transaction Guard, the DBA must grant the following authorization:
GRANT EXECUTE ON DBMS_APP_CONT ;
This source has been very much helpful in doing our research. Read more about failover_restore and let us know what you think.
transparent application continuity 19coracle application continuity exampleenable application continuityfailover_restoreora-41409ora net ping_timeout,People also search for,Privacy settings,How Search works,transparent application continuity 19c,oracle application continuity example,enable application continuity,failover_restore,ora-41409,ora 25420 too many calls in request replay disabled,ora net ping_timeout