I know you can set user profiles or set a general timeout for query.
But I wish to set timeout to a specific query inside a procedure and catch the exception, something like :
begin
      update tbl set col = v_val; --Unlimited time
      delete from tbl where id = 20; --Unlimited time
      begin
            delete from tbl; -- I want this to have a limited time to perform
            exception  when (timeout???) then
            --code; 
      end;
end;
Is this possible? is there any timeout exceptions at all I can catch? per block or query? didn’t find much info on the topic.
Advertisement
Answer
No, you can not set a timeout in pl/sql. You could use a host language for this in which you embed your sql and pl/sql.