Session Blocked by another idle session

Database
Enthusiast

Session Blocked by another idle session

In View Point , I am observing an IDLE session is blocking an ACTIVE session.On further investigating, I found the blocker session is holding a Read Lock on one of the tables that the blocked session is trying to access.

BLOCKED BY

USERNAME UserName 

HOST 1 

SESSION ID 266310918 

LOCK TYPE Read 

STATUS Granted 

LOCKED RowHash DBName.TableName

When i see the session details of 266310918, it is as follows:

STATE   IDLE 

TIME IN STATE 0:40:50 

TOTAL DURATION0:00:00

Can anyone explain this: 1) Is the blocker session still executing any query, as its holding up a read lock on a table?

2)If its still executing a query , then how can it be IDLE?


1 REPLY
Teradata Employee

Re: Session Blocked by another idle session

Hi,

One possible scenario is when a session has an unfinished transaction.    This is when a user has issued a  BEGIN TRANSACTION is Teradata transaction mode, or is working in ANSI transaction mode.    Until the transaction is finished, the session holds the locks.    If it is waiting for the next command to be entered by user, it can be in the IDLE state.

Regards,

Vlad.