cancel
Showing results for 
Search instead for 
Did you mean: 

Blocked transactions view in hana

Former Member
0 Kudos

Hi All,

M_BLOCKED_TRANSACTIONS view contains BLOCKED_TIME as one of the column, what is the unit it is in?

Is it seconds or minutes?

https://help.sap.com/saphelp_hanaplatform/helpdata/en/20/a8c51d75191014b6c0e177ae946724/content.htm

Message was edited by: Tom Flanagan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Practically there is not an easy way to see the same since i dont have any blocked transaction so i dont know what unit it is in?

Former Member
0 Kudos

Basically i wanted the current time stamp - 10 minutes, how do we achieve the same in HANA.

SELECT CURRENT_TIMESTAMP "current timestamp" FROM DUMMY;

select (CURRENT TIMESTAMP - 10 minutes) from DUMMY isnt working in hana.

Former Member
0 Kudos

BLOCKED_TIME is a timestamp (start of the blocking situation), so it doesn't have a dedicated unit. You may have a look at SQL: "HANA_Locks_Transactional_LockWaits" (SAP Note 1969700) to understand how to display the timestamp and how to calculate the number of seconds between the BLOCKED_TIME and the current timestamp:

  TO_CHAR(T.BLOCKED_TIME, 'YYYY/MM/DD HH24:MI:SS') WAIT_SINCE,

  LPAD(SECONDS_BETWEEN(T.BLOCKED_TIME, CURRENT_TIMESTAMP), 7) WAIT_S,

If you want to substract 10 minutes from the current timestamp, you can use:

ADD_SECONDS(CURRENT_TIMESTAMP, -600)

Former Member
0 Kudos

Martin,

Thanks a ton for info, you know what i want in spite of me not phrasing the question correctly .

I took the help of the existing sql and then used ADD_SECONDS(CURRENT_TIMESTAMP, -600)

Thanks again.

Answers (0)