Adabas Response Codes and Subcodes in Cluster-Specific Cases
This chapter describes the cases in which Adabas returns a response code and subcode for commands processed in a cluster environment. A response code is returned after each Adabas command is processed. Some response codes also return a subcode. For more information about the Adabas response codes and subcodes, see Adabas for Linux and Cloud > Messages and Codes > Nucleus Response Codes.
Update Commands on Secondary Node
Only the primary node is allowed to accept update commands (create, update, insert, delete). Such commands are rejected on a secondary node returning Adabas response code 22 and subcode 45.
Example:
[saguser@ADACLU52 softwareag]$ adaopr dbid=52 disp=clu
%ADAOPR-I-STARTED, 22-MAR-2022 13:22:01, Version d.d.d.d (Linux 64Bit)
Database 52, startup at 22-MAR-2022 13:21:43
ADANUC Version d.d.d.d, PID 13333
ADANUC Version d.d.d.d
Database 52 Cluster on 22-MAR-2022 13:22:00
Cluster UUID f4c957e6-a9e2-11ec-beb3-7e215e61fada
view was last updated at sequence number 4
cluster is at sequence number 4
3 Node(s) Primary component of the cluster
NAME ADATCP STATUS
ADACLU52-55052 adatcp://ADACLU52:56052 SYNCED
ADACLU51-55051 adatcp://ADACLU51:56051 SYNCED
ADACLU53-55053 adatcp://ADACLU53:56053 SYNCED
Primary node: ADACLU51-55051
Current node: ADACLU52-55052
Status of this node: Synced
%ADAOPR-I-TERMINATED, 22-MAR-2022 13:22:01, elapsed time: 00:00:00
[saguser@ADACLU52 softwareag]$ $ACLDIR/examples/bin/c_example
Software AG - C example program for calling ADABAS
usage: c_example dbid employee file number
[saguser@ADACLU52 softwareag]$ $ACLDIR/examples/bin/c_example 52 9
Software AG - C example program for calling ADABAS
** Response code 22 from ADABAS for Command S4
** Additions2 45
Update Commands on Primary Node in Status UNDEFINED
Any unplanned shutdown of the two secondary nodes changes the status of the primary node from SYNCED to UNDEFINED and all update commands are rejected with Adabas response code 9 and subcode 76.
Example:
[saguser@ADACLU51 softwareag]$ adaopr dbid=51 disp=clu
%ADAOPR-I-STARTED, 22-MAR-2022 13:55:10, Version d.d.d.d (Linux 64Bit)
Database 51, startup at 22-MAR-2022 13:21:17
ADANUC Version d.d.d.d, PID 13709
ADANUC Version d.d.d.d
Database 51 Cluster on 22-MAR-2022 13:55:09
Cluster UUID f4c957e6-a9e2-11ec-beb3-7e215e61fada
view was last updated at sequence number 5
cluster is at sequence number 5
1 Node(s) Non primary component of the cluster
NAME ADATCP STATUS
ADACLU51-55051 adatcp://ADACLU51:56051 UNDEFINED
Primary node: ADACLU51-55051
Current node: ADACLU51-55051
Status of this node: Initialized
%ADAOPR-I-TERMINATED, 22-MAR-2022 13:55:10, elapsed time: 00:00:00
[saguser@ADACLU51 softwareag]$ $ACLDIR/examples/bin/c_example
Software AG - C example program for calling ADABAS
usage: c_example dbid employee file number
[saguser@ADACLU51 softwareag]$ $ACLDIR/examples/bin/c_example 51 9
Software AG - C example program for calling ADABAS
Found 5 records with name SMITH, increase salary by 10 %
1. ISN = 579 old salary = 19000 new salary = 20900
2. ISN = 634 old salary = 50000 new salary = 55000
3. ISN = 670 old salary = 24000 new salary = 26400
4. ISN = 727 old salary = 33000 new salary = 36300
5. ISN = 787 old salary = 30000 new salary = 33000
** Response code 9 from ADABAS for Command CL
** Additions2 76
Existing Client Sessions after Planned/Unplanned Shutdown of the Primary Node
Shutdown of the primary node causes all existing client sessions to receive response code 9 (transaction or session abnormally terminated) for the next Adabas command sent to the cluster.
Example of the ADATST session:
Command : L1 Test-Nr : 3 Started
%ADATST-E-ADA009, Transaction or session abnormally terminated
Response Code : 9 |00000009|
Additions 2 : ..ST |02005354|
Command : L1 Test-Nr : 3 Completed
Note:
Session failover is currently not possible.
Starting a Database in Read-Only Mode
You cannot start a database that is part of a cluster in read-only mode by setting one of the cluster nodes to be read-only.
To start a database in read-only mode, you must turn the cluster node into a standalone database. For information about setting up a standalone database from a cluster node, see Setup Cluster Node as Standalone Database.