DBA Hub

📋Steps in this guide1/10

Step-by-Step Guide: Configure Transparent Application Continuity (TAC) in Oracle RAC

Learn how to configure Transparent Application Continuity (TAC) in Oracle RAC with a step-by-step guide.

oracle configurationintermediate
by OracleDba
14 views
1

Environment Overview

– DB Name: prim – CDB with PDB: pdbprim – Nodes: prim1, prim2 – Service Name: fg_tac.learnomate.org – SCAN Host: node-scan – User: pdbuser – Table for Demo: test_table
2

1. Create the TAC-Enabled Service

Run the following as the grid user:

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
srvctl add service -db prim \
-service fg_tac.learnomate.org \
-pdb pdbprim \
-preferred prim1 \
-available prim2 \
-failovertype TRANSACTION \
-failovermethod BASIC \
-commit_outcome TRUE \
-replay_init_time 1800 \
-retention 86400 \
-notification TRUE \
-tafpolicy BASIC
3

2. Verify the Service Configuration

Code/Command (click line numbers to comment):

1
srvctl config service -db prim -service fg_tac.learnomate.org
4

3. Start the Service

Code/Command (click line numbers to comment):

1
srvctl start service -db prim -service fg_tac.learnomate.org
5

4. Create TNS Entry (on Client Side)

In tnsnames.ora:

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
FG_TAC =
(DESCRIPTION =
(FAILOVER=ON)
(LOAD_BALANCE=ON)
(ADDRESS = (PROTOCOL = TCP)(HOST = node-scan)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = fg_tac.learnomate.org)
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = BASIC)
(RETRIES = 180)
(DELAY = 5)
)
)
)
6

5. Simulate a Client Transaction

Login to the PDB as application user (pdbuser):

Code/Command (click line numbers to comment):

1
2
3
4
5
6
sqlplus pdbuser/password@FG_TAC

-- Run DML
INSERT INTO test_table VALUES (1, 'Oracle TAC Demo');
-- DO NOT commit
SELECT * FROM test_table;
7

6. Simulate Node Failure

Assuming prim1 is the current host:

Code/Command (click line numbers to comment):

1
srvctl stop instance -db prim -instance prim1 -force
8

7. Observe TAC Behavior

– Your SQL session will not get disconnected. – DML operation will be replayed on prim2. – No ORA-3113 or ORA-25408 errors. – You can commit now:

Code/Command (click line numbers to comment):

1
COMMIT;
9

8. Verify Transparent Application Continuity

Run this on the new node: Expected Output: Important Notes – Application doesn’t require code changes but must use Oracle-supported drivers like JDBC, ODP.NET, Oracle Call Interface, etc. – Replay buffers the session to memory; long idle sessions may not be eligible. – Works best when the app uses services with TAC setup, not just SYSDBA logins.

Code/Command (click line numbers to comment):

1
2
3
SELECT FAILOVER_TYPE, FAILOVER_METHOD, SESSION_STATE
FROM V$SESSION
WHERE SERVICE_NAME = 'fg_tac.learnomate.org';
10

Final Thoughts

Transparent Application Continuity (TAC) is a powerful feature for increasing uptime and user satisfaction. Whether it’s a planned maintenance or an unplanned outage, TAC ensures that your application doesn’t feel the impact . If you want to learn more or practice this in a live environment, check out Learnomate Technologies for labs, videos, and expert guidance! For better insights, don’t forget to visit our YouTube channel : www.youtube.com/@learnomate . Want to explore more about different technologies? Check out our blog section: https://learnomate.org/blogs/ . Explore our website to know more about our courses and training : www.learnomate.org . Connect with me personally on LinkedIn : Ankush Thavali

Comments (0)

Please to add comments

No comments yet. Be the first to comment!