Share

Transparent Application Continuity (TAC)

What is Transparent Application Continuity (TAC)?

With the release of Oracle Database 18c, Transparent Application Continuity introduces an automated method for session recovery. It operates by transparently recording both session and transactional states, thereby enabling the reconstruction of a database session following a recoverable outage. This mechanism is inherently safe and operates without necessitating any DBA insight into the application logic or any modifications to the application code. The transparency is facilitated by a sophisticated state-tracking infrastructure that categorizes session state usage during application-initiated database calls. By employing this method, Transparent Application Continuity ensures that applications are robust against future changes, maintaining their recoverability as the application or its underlying environment evolves.

Licensing (What You Need to Pay For)

To use TAC, you must already have one of these extra Oracle features:

  • Oracle Active Data Guard

  • Oracle RAC One Node

  • Oracle Real Application Clusters (RAC)

Which Programs Work with TAC? (Supported Tools)

In Oracle’s cloud database (Autonomous Database), TAC works with many different programming languages and tools. For the best performance, you should always use the newest versions.

Here’s who is supported:

  • For Java: Oracle JDBC Replay Driver (version 18c or newer). This lets Java apps use TAC.

  • For Connection Pools: Oracle Universal Connection Pool (UCP) 18c or newer.

  • For App Servers: Oracle WebLogic Server 18c and other Java app servers that use UCP.

  • For Other Languages:

    • For C/C++: Oracle Call Interface (OCI) 19c or newer.

    • For .NET: ODP.NET Unmanaged Provider 18c or newer.

    • For Command Line: SQL*Plus 19c or newer.

Tip for Third-Party Servers: If you use a non-Oracle Java application server, the easiest way to get high availability is to replace your current data source with Oracle UCP.

Troubleshooting (If You Get an Error)

If you have problems with TAC, don’t panic! There are tools to help you.

  1. The TAC Checklist: Look at this checklist from Oracle to make sure you set everything up correctly: https://www.oracle.com/technetwork/database/clustering/checklist-ac-6676160.pdf

  2. The ACCHK Tool: On Oracle Support, there’s a tool called “ACCHK” (Application Continuity Check) (Document ID: 2862075.1). You can use this tool to find and report problems with TAC or AC.

How to Configure Transparent Application Continuity (TAC) in Oracle RAC ?

Step 1. Create a TAC-enabled database service.
$ srvctl add service -db CDBPROD \
                     -service srv_tac \
                     -pdb PDB \
                     -preferred oradb1,oradb2 \
                     -failovertype AUTO \
                     -failover_restore AUTO \
                     -failoverdelay 5 \
                     -failoverretry 30 \
                     -commit_outcome TRUE \
                     -replay_init_time 600
Step 2. Start the created service
$ srvctl start service -db CDBPROD -service srv_tac
Step 3. Check the configuration of the service.
$ srvctl config service -db CDBPROD -service srv_tac
Service name: srv_tac
Server pool:
Cardinality: 2
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Global: false
Commit Outcome: true
Failover type: AUTO
Failover method:
Failover retries: 30
Failover delay: 5
Failover restore: AUTO
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: NONE
Edition:
Pluggable database name: PDB
Hub service:
Maximum lag time: ANY
SQL Translation Profile:
Retention: 86400 seconds
Replay Initiation Time: 600 seconds
Drain timeout:
Stop option:
Session State Consistency: AUTO
GSM Flags: 0
Service is enabled
Preferred instances: oradb1,oradb2
Available instances:
CSS critical: no
Service uses Java: false
Step 4. Check that the service is running.
$ srvctl status service -db CDBPROD -service srv_tac
Service srv_tac is running on instance(s) oradb1,oradb2
Test TAC via SQL*Plus
It is recommended to test TAC via SQL*Plus since SQL*Plus 19c supports TAC without additional configuration.
1. Create the connection string for the service
SRV_TAC=
     (DESCRIPTION=
           (TRANSPORT_CONNECT_TIMEOUT=3) (RETRY_COUNT=6)
           (ADDRESS= (PROTOCOL=tcp) (HOST=oradb1.interiva.local (PORT=1521))
           (ADDRESS= (PROTOCOL=tcp) (HOST=oradb2.interiva.local) (PORT=1521))
           (CONNECT_DATA =
              (SERVICE_NAME = SRV_TAC)
           )
)
2. Connect through the service and create a test table
SQL> create table tac_table(msg varchar2(100));

Table created.
3. Confirm that failover parameters are set
SQL> select failover_type, failover_method, failed_over from v$session where sid=sys_context('userenv', 'sid');


FAILOVER_TYPE FAILOVER_M FAI
------------- ---------- ---
AUTO          BASIC      NO
4. Determine a DB instance to which the session is connected
SQL> select host_name,instance_name from v$instance;


HOST_NAME                      INSTANCE_NAME
------------------------------ ----------------
oradb1.interiva.local          oradb1
5. Start a new transaction without committing it
SQL> insert into tac_table values ('TAC is being tested');

1 row created.
6. Shutdown the DB instance that the session is connected to
$ srvctl stop instance -db CDBPROD -instance oradb1 -force
7. Return to the session and commit the transaction
SQL> commit;


Commit complete.
8. Confirm that the failover happened
SQL> select failover_type, failover_method, failed_over from v$session where sid=sys_context('userenv', 'sid');


FAILOVER_TYPE FAILOVER_M FAI
------------- ---------- ---
AUTO          BASIC      YES
9. Confirm that the session failed over to another cluster node
SQL> select host_name,instance_name from v$instance;


HOST_NAME                      INSTANCE_NAME
------------------------------ ----------------
oradb2.interiva.local          oradb2
10. Confirm that the data is saved to the table
SQL> select * from tac_table;


MSG
----------
TAC is being tested

Loading

You may also like