Symptom
1. In HADR setup, after configuring distributed application of transactions in DSI for HAVR following doc below and set dt_apply to a value larger than 1,
Configuring Distributed Application of Transactions in DSI for HVAR
Following error is reported in standby ASE log
00:0006:00000:04342:xxxx/05/17 21:04:12.92 server Error: 12205, Severity: 17, State: 2
00:0006:00000:04342:xxxx/05/17 21:04:12.92 server Could not acquire a lock within the specified wait period. SERVER level wait period=1800 seconds, spid=4342, lock type=exclusive row, dbid=4, objid=33442766, pageno=222030387, rowno=4. Aborting the transaction.
SRS log:
E. xxxx/05/17 21:04:12. ERROR #1028 WORKER( ) - neric/dsi/dsiqmint.c(5239)
Message from server: Message: 12205, State 2, Severity 17 -- 'Could not acquire a lock within the specified wait period. SERVER level wait period=1800 seconds, spid=4342, lock type=exclusive row, dbid=4, objid=33442766, pageno=222030387, rowno=4. Aborting the transaction.
The value for 'Server level wait period' depends on ASE configuration value for 'lock wait period'.
2. Before error 12205 is reported, from target ASE, you may notice the maint user process is blocked and waiting for lock until timeout, and replication backlog starts to increase. Here are some sample outputs on standby ASE
1> sp_w
2> go
fid spid command execution_time physical_io blocked
------ ------ ---------------------------------- -------------------- ----------- -------
0 21 HADR PRIMARY CHECK 6343 0 0
0 22 JOB SCHEDULER 23001 0 0
0 3831 UPDATE 211044 0 0
1> sp_monitor connection
2> go
spid LoginName ElapsedTime CPU_Time Physical_Reads LocksHeld SQLText
---- --------- ----------- -------- -------------- --------- -----------------------------------------------------------------------------------------------------------------------
3831 DR_maint 219000 100 0 1856 update SAPSR3."REPOSRC" set "R3STATE"='A' where "PROGNAME"='/BLACKLIN/CL_BAL_ACCTA_CGL_ECCCCDEF' and "R3STATE"='P'
1> sp_who DR_maint
2> go
fid spid status loginame origname hostname blk_spid dbname tempdbname cmd block_xloid threadpool
--- ---- ---------- -------- -------- ------------- -------- ------ ---------- ---------------- ----------- ----------------
0 3831 lock sleep DR_maint DR_maint <hostname> 0 <dbname> tempdb UPDATE 149455 syb_default_pool
1> select * from master..syslogshold
2> go
dbid reserved spid page xactid masterxactid starttime name xloid
------ ----------- ------ ---------- -------------- -------------- ------------------------------- ------------------------------------------------------------------- -----------
4 0 0 1211866101 0xf59b3b480000 0x000000000000 Aug 17 2025 8:27AM 0_0g00pw0006I0001I04I4rywDaHJay5ku00Bay5gb02E00bcX0djQKg0000000047_ 151061
(1 row affected)
1> sp_transactions
2> go
xactkey type coordinator starttime state connection dbid spid loid failover srvname namelen xactname
------------------------------ ----------- ----------- -------------------- ----------------- ---------- ------ ------ ----------- -------------------------- ------------------------------ ------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
0x0000000000000000000000000000 Local None Aug 17 2025 8:32AM In Command Attached 31516 14 28 Resident Tx NULL 11 $audit_xact
0x0000000000000000000000000000 Local None Aug 17 2025 8:27AM Begun Attached 4 723 1446 Resident Tx NULL 17 $user_transaction
0x019c3b489f000000f25bc4330400 External XA Aug 17 2025 8:27AM Prepared-Detached Detached 4 0 89149 Resident Tx NULL 82 0_0g00pw0006I0001I04I4rywDaHJay5ku00Bay5gb02E00bcX0djQKg0000000047_2g0000_:<SID>_<sitename>
0xf59b3b4800000000f25bc4330400 External XA Aug 17 2025 8:27AM Prepared-Detached Detached 4 0 151061 Resident Tx NULL 82 0_0g00pw0006I0001I04I4rywDaHJay5ku00Bay5gb02E00bcX0djQKg0000000047_600000_:<SID>_<sitename>
0xf69b3b4817000000f25bc4330400 External XA Aug 17 2025 8:27AM Prepared-Detached Detached 4 0 23233 Resident Tx NULL 82 0_0g00pw0006I0001I04I4rywDaHJay5ku00Bay5gb02E00bcX0djQKg0000000047_4g0000_:<SID>_<sitename>
0xf99b3b4822000000f25bc4330400 External XA Aug 17 2025 8:27AM Prepared-Detached Detached 4 0 148553 Resident Tx NULL 82 0_0g00pw0006I0001I04I4rywDaHJay5ku00Bay5gb02E00bcX0djQKg0000000047_900000_:<SID>_<sitename>
0xfb9b3b483a000000f25bc4330400 External XA Aug 17 2025 8:27AM In Command Attached 4 3831 142229 Resident Tx NULL 82 0_0g00pw0006I0001I04I4rywDaHJay5ku00Bay5gb02E00bcX0djQKg0000000047_500000_:<SID>_<sitename>
0xff9b3b4846000000f25bc4330400 External XA Aug 17 2025 8:27AM Prepared-Detached Detached 4 0 149455 Resident Tx NULL 82 0_0g00pw0006I0001I04I4rywDaHJay5ku00Bay5gb02E00bcX0djQKg0000000047_9g0000_:<SID>_<sitename>
(8 rows affected)
(return status = 0)
1> sp_lock @verbose=0
2> go
fid spid loid locktype partitionid page row objectName id class context
0 0 149455 Ex_row 0 1372431281 1 PRE..REPOSRC 33442766 Non Cursor Lock Range
Above commands output shows spid 3831 which is doing update is waiting for a lock which is held by xloid 149455, and both are XA branches. xloid 149455 is already completed and detached from ASE thread, so spid value is 0.
And because XA uses isolation level 3 by default, loid 149455 will use Range lock, so it will block the subsequent update operation. See reproducible steps below.
Read more...
Environment
SAP Adaptive Server Enterprise with Always-on
Keywords
error 12205, CR831147, dsi_isolation_level , KBA , BC-SYB-REP-SAP , Replication with SAP Suite / SAP BW , BC-SYB-REP , Sybase Replication Server (standalone) , Problem
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.
SAP Knowledge Base Article - Preview