Options

ERROR 5156: Unavailabler: initiator locks for query - Locking failure: Timed out X locking

 
Hi 
I get ERROR : 5156  while triggering below mentioned query 
 
aqua=> DELETE FROM public.customer_dimension WHERE where cell_id=0
ERROR 5156: Unavailabler: initiator locks for query - Locking failure: Timed out X locking Table:ncell.CUSTOMER_DIMENSION. X held by [user ncellah (delete from ncell.access_dimension where cell_id=0). Your current transaction isolation level i s READ COMMITED
 
I following this link as well LOCK
 
BUT My question here is what is the steps if i wanted to UNLOCK  and trigger following query succesffuly
 
DELETE FROM public.customer_dimension WHERE where cell_id=0
 
PLEASE SUGGEST
 

Comments

  • Options

     Identify the session that has a lock on the  table and take action kill it,let it finish,identify the bottleneck.

     

    See lock

     

    select * from locks:

     

    To monitor oll your sessions:

    - this will generate the kill syntax as well

     

    SELECT
    node_name
    ,user_name
    ,'SELECT CLOSE_SESSION(''' || session_id || ''');' AS CloseSession
    ,statement_start
    ,(GETDATE() - statement_start)::INTERVAL AS current_statement_duration
    ,REGEXP_REPLACE(current_statement,'[\r\n\t]',' ') AS current_statement
    ,session_id
    ,transaction_id
    ,statement_id
    ,client_hostname
    ,client_os
    ,login_timestamp
    ,runtime_priority
    ,ssl_state
    ,authentication_method
    ,transaction_start
    ,GETDATE() AS Today
    FROM v_monitor.sessions
    ORDER BY current_statement_duration DESC
    ;

  • Options

    Thanks Adrian. Thanks a lot

  • Options

     This you got it fixed ? if so mark as fixed 

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file