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.
-
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
-
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 ?
$ 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
$ srvctl start service -db CDBPROD -service srv_tac
$ 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
$ srvctl status service -db CDBPROD -service srv_tac
Service srv_tac is running on instance(s) oradb1,oradb2
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)
)
)
SQL> create table tac_table(msg varchar2(100));
Table created.
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
SQL> select host_name,instance_name from v$instance;
HOST_NAME INSTANCE_NAME
------------------------------ ----------------
oradb1.interiva.local oradb1
SQL> insert into tac_table values ('TAC is being tested');
1 row created.
$ srvctl stop instance -db CDBPROD -instance oradb1 -force
SQL> commit;
Commit complete.
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
SQL> select host_name,instance_name from v$instance;
HOST_NAME INSTANCE_NAME
------------------------------ ----------------
oradb2.interiva.local oradb2
SQL> select * from tac_table;
MSG
----------
TAC is being tested










