How to cancel a long-running Database operation?

前端 未结 11 959
臣服心动
臣服心动 2020-11-30 04:18

Currently working with Oracle, but will also need a solution for MS SQL.

I have a GUI that allows users to generate SQL that will be executed on the database. This

11条回答
  •  执念已碎
    2020-11-30 04:25

    What about opening a new connection to the database, login in as sysdba and sending a "ALTER SYSTEM KILL SESSION 'sid,serial#' IMMEDIATE" command specifying the SID of the process you want to terminate.

    To get the sessionID: select sid from v$mystat where rownum = 1

    To get Serial#: select sid, serial# from v$session where sid = :SID

    http://www.oracle-base.com/articles/misc/KillingOracleSessions.php

    EDIT: WW idea for not Login as sysdba here: http://forums.oracle.com/forums/thread.jspa?threadID=620578

提交回复
热议问题