We can sometimes see that the Name and Userid is (NULL) in sp_iqtransaction like below.
select * from sp_iqtransaction() where Name is null and userid is null ;
[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);*/
5. We can see that Name and Userid of “Session A” is null after disconnection.
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.”
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.
>> /*select * from gjang;*/