通常使用RDP (Remote Desktop Protocol) 連到遠端的資料庫伺服器去kill Oracle process時,
會使用以下的OS語法:

Usage:  orakill sid thread
  where sid    = the Oracle instance to target
        thread = the thread id of the thread to kill

  The thread id should be retrieved from the spid column of a query such as:
        select spid, osuser, s.program from
        v$process p, v$session s where p.addr=s.paddr

然而執行後卻可能出現以下的錯誤訊息:
Could not attach to Oracle instance : sid err = 2

這個原因是因為執行的client並非在Console端.
解決方法有二:
1.  直接在Console(本機)上執行 orakill 指令
2. 在remote端的command line 下以下的指令:
     mstsc /v: /console 
     e.g.  mstsc /v:192.168.1.123 /console 

    此時,另一個遠端桌面連線會Pop up,輸入帳密後就會連到console(視同本機端).
    然後再orakill sid thread 
就可以成功刪除Oracle process.


    
 

 

     

arrow
arrow
    全站熱搜

    DanBrother 發表在 痞客邦 留言(0) 人氣()