Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Gisung
Advisor
Advisor
0 Kudos

We can sometimes see that the Name and Userid is (NULL) in sp_iqtransaction like below.

[SQL]

  select * from sp_iqtransaction() where Name is null and userid is null ;

NameUseridTxnIDCmtIDVersionIDStateConnhandleIQConnID...TxnCreateTime
(NULL)(NULL)524586215245862652458626COMMITTED582714410...2014-04-28 14:59:26.041

[Steps to reproduce]

There are two session A and B.

1. create a test table.

    - create table gjang(c1 int);

2. [Session A]

    - Data has been changed using insert command.

      >> insert gjang values(1);

3. [Session B]

    - Before commit is executed in "Session A", Reference old version of
gjang table in "Session B".

      >> select * from gjang;

4. [Session A]

    - Execute commit and then disconnect from "Session A".

      >> /*insert gjang values(1);*/
      >> commit

5. We can see that Name and Userid of "Session A" is null after disconnection.

[Cause]

If "Session A" has been disconnected, Name and Userid becomes NULL. Because
"Session B" is still referencing an old version of table in "Session A."

[Session B]

NameUseridTxnIDCmtIDVersionIDStateConnhandleIQConnID...TxnCreateTime
SQL_DBC_10a18710DBA52458705052458705ACTIVE572714356...2014-04-28 15:00:36.545

If Executing a commit after completing a referencing job in "Session B",
State of "Session A" will be changed from COMMITTED to APPLIED.
And then "Session A" will be disappeared in sp_iqtransaction when next checkpoint.

[Session B]

>> /*select * from gjang;*/
>> commit;

Thanks

Gi-Sung Jang

4 Comments