5.1 Configure TAC for OFSLL Application and Database

This topic provides the information about the configure TAC for OFSLL application and batabase.

  • TAC is not enabled by default for Oracle RAC databases but can be enabled with simple configuration.
  • No application code changes are required; TAC is driven by connection settings.
  • TAC configurations are connection parameters and service attributes that enable replay of database requests via Application Continuity.

Database Configuration – Add TAC-Enabled Service (srvctl)

Use the following command to create a TAC-enabled service for the OFSLL PDB with appropriate failover, replay, and notification settings:
  • Syntax:
    • srvctl add service -d <DB_UNIQUE_NAME> -s <SERVICE_NAME> -r <PREF_INST1>,<PREF_INST2> -pdb <PDB_NAME> -failovertype AUTO -failover_restore AUTO -commit_outcome TRUE -replay_init_time 600 -drain_timeout 300 -notification TRUE
  • Example:
    • srvctl add service -d TEST_DB -s TEST_TAC -r TEST1,TEST2 -pdb PDBTEST -failovertype AUTO -failover_restore AUTO -commit_outcome TRUE -replay_init_time 600 -drain_timeout 300 -notification TRUE
  • Describe each flag configures:
    • -d TEST_DB: Database unique name hosting the service.
    • -s TEST_TAC: Service name for TAC-enabled workload.
    • -r TEST1, TEST2: Preferred RAC instances for the service.
    • -pdb PDBTEST: Target PDB for the service.
    • -failovertype AUTO: Enables Application Continuity with automatic request replay.
    • -failover_restore AUTO: Restores session state automatically on replay.
    • -commit_outcome TRUE: Enables Transaction Guard commit outcome tracking.
    • -replay_init_time 600: Allows up to 600s to initiate replay after an interruption.
    • -drain_timeout 300: Drains existing sessions for up to 300s during relocation.
    • -notification TRUE: Enables FAN notifications to clients/pools.

After adding the service, start and verify it:

Start service:
  • Syntax:
    • srvctl start service -d <DB_UNIQUE_NAME> -s <SERVICE_NAME>].
  • Example:
    • srvctl start service -d TEST_DB -s TEST_TAC.
Check Status:
  • Syntax:
    • srvctl status service -d <DB_UNIQUE_NAME> -s <SERVICE_NAME>].
  • Example:
    • srvctl status service -d TEST_DB -s TEST_TAC.
Application (Client) Configuration – Connection Parameters:
  • Enable Application Continuity/TAC via connection properties in JDBC/ODP.NET/UCP:
    • oracle.net.enableAC=true
    • oracle.jdbc.fanEnabled=true
    • replayInitiationTimeout=600
    • connectTimeout=10; loginTimeout=10
    • retryCount=3; retryDelay=3
  • Always connect by SERVICE_NAME to TEST_TAC.
Grant KEEP privileges for mutables (to ensure deterministic replay):
  • For sequences used by the application, grant keep sequence on <schema>.<sequence_name> to <APP_USER>.
  • Repeat for all sequences accessed in replayed requests.
TNS Entry – Generic Syntax for TAC-enabled Service:
  • Syntax:

Table 5-1 Detailed Description of Each Parameter

Placeholder / Parameter Description
<SERVICE_ALIAS> TNS Alias Name – Logical reference name used by clients to connect (e.g., TAC_SERVICE_TEST).
PROTOCOL Communication protocol – typically TCP for standard connections or TCPS for SSL-secured connections.
<SCAN_HOSTNAME> SCAN (Single Client Access Name) hostname for the RAC database cluster; provides load balancing and failover (e.g., cluster-scan.example.com).
<PORT_NUMBER> Listener port number – Default is 1521 unless changed in the listener configuration.
SERVER = DEDICATED Ensures each session uses a dedicated server process; typical for Application Continuity.
<FULL_SERVICE_NAME> Global Service Name in the format <SERVICE_NAME>.<DB_DOMAIN>; must be a TAC-enabled service. The DB domain matches the database db_domain parameter.
  • Example:

Oracle WebLogic Data source connection URL (TAC-enabled).

Setting up a JDBC connection to the data source.

Syntax:
  • jdbc:oracle:thin:@//primary-scan:1521/YOUR_SERVICE
Example:
  • jdbc:oracle:thin:@// scan-hostname-test.example.com:1521/ TAC_SERVICE_TEST