Killing a long running query with a remote reference
671951Mar 30 2012 — edited Mar 31 2012The following query was run against a local database that references tables in a remote database. I wanted to kill the session running on the local database which I did and saw that it was marked for kill. The session continued to run for hours on the local database and someone finally killed a session for it on the remote database, which was done successfully.
SELECT row_id
FROM S_CONTACT
WHERE con_cd='Customer'
AND ROW_ID not in
(
SELECT CON_ID
FROM S_POSTN_CON
)
minus
SELECT row_id
FROM S_CONTACT@remote_db
WHERE con_cd='Customer'
AND ROW_ID not in
(
SELECT CON_ID
FROM S_POSTN_CON@remote_db
)
This behavior prompted a number of questions that I can't find answers for:
1) When I kill a local session that has started a remote session does anything get communicated to the remote session to kill it?
2) What SQL actions need to be completed before a session can be terminated? I am aware that any rollbacks must complete. Does that include writing to implicit tables for queries?
3) What would be the correct procedure for killing sessions and any remote sessions?
Thank you,
Richard