SP2-0618: Cannot find&…

SP2-0618: Cannot find the Session Identifier.  Check PLUSTRACE role is enable

 

以前一直用 SYS 用戶使用 autotrace, 今天用其它用戶使用 autotrace 來獲得執行計劃報如下錯誤

SQL> set autotrace on

SP2-0618: Cannot find the Session Identifier.  Check PLUSTRACE role is enabled

SP2-0611: Error enabling STATISTICS repor

第一反應是授予用用戶 plustrace 角色

SQL> conn / as sysdba

Connected.

SQL>  grant plustrace to oak;

  grant plustrace to oak

       *

ERROR at line 1:

ORA-01919: role 'PLUSTRACE' does not exist

報角色不存在錯誤

plustrace 角色在數據庫 創建時並不會創建

這個角色可通過運行下面的 sql 來創建

$ORACLE_HOME/sqlplus/admin/plustrce.sql

授予用戶 plustrace 角色

SQL> grant plustrace to oak;

 

Grant succeeded.

啓用 autotrace

SQL> set autotrace on

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章