Few Clarifications
Ganesh Sundaresan, February 23, 2019 - 2:53 pm UTC
Thanks for the feedback Connor.
I had looked into the post before too and wasn't sure if that implementation has to be done on each of the Target DB's to take effect?! If so, it would be an herculean task as it would require me to have a specific account created assign RM to that account for queries running longer than certain period of time. Will that RM method work on the Central DB where I am initiating DB Link from?
Meaning, I will have RM construct on my Central/Local DB. Run the code and if a remote DB takes more than 60sec, RM will stop that gracefully and I can capture that exception and move to the next DB?
Appreciate your thoughts.
thanks
Ganesh
Couple more updates
Ganesh Sundaresan, February 25, 2019 - 5:08 pm UTC
Greetings -
I tried implementing RM on the Central DB. I have set SWITCH_ELAPSED_TIME and SWITCH_GROUP to 100s and CANCEL_GROUP respectively. When I run query using dblink from sqlplus interface, it comes back applying RM with error : ORA-56735.
But, when I run the package where I have all those procedures that dynamically creates dblink, query and drop the link once the query is complete, I do see the select via dblink is hanging and RM seems not applying.
Wanted to update this fact and get your thoughts.
thanks
Ganesh
Got it working
Ganesh Sundaresan, February 25, 2019 - 8:03 pm UTC
Greetings -
I am able to get this working with RM construct on the Central DB for the specific user running the package. Earlier I had most of the procs defined with "PRAGMA AUTONOMOUS" that was causing RM not to fire properly.
Thanks for your inputs and providing direction to get to resolution.
Wish we had simpler solution of graceful termination of SQL Cursor when it runs beyond certain time. Something like
Open Cursor for <sql> for <time-interval>
Ganesh
February 26, 2019 - 1:56 am UTC
Hey, great work on getting it working. (Saved me from setting this up on a couple of databases here).
I love it when people take an AskTOM answer and the run with it, explore it, test it.
So many other people just come back with: "Hey I need the full code for me to cut and paste".
Made my day!