必须声明标识符 'DBMS_SYSTEM.SET_EV'

     在用10046事件trace其他会话时,报错

SQL> exec dbms_system.set_ev(148,46,10046,12,'');
BEGIN dbms_system.set_ev(148,46,10046,12,''); END;
      *
第 1 行出现错误:
ORA-06550: 第 1 行, 第 7 列:
PLS-00201: 必须声明标识符 'DBMS_SYSTEM.SET_EV'
ORA-06550: 第 1 行, 第 7 列:
PL/SQL: Statement ignored。

      我记得刚才明明是授权过,如下:

C:\Documents and Settings\gg>sqlplus sys/oracle as sysdba;
SQL*Plus: Release 10.2.0.1.0 - Production on 星期一 6月 24 22:01:01 2013
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> grant execute on dbms_system to test;
授权成功。

       解决方案:

C:\Documents and Settings\gg>sqlplus test/test
SQL*Plus: Release 10.2.0.1.0 - Production on 星期一 6月 24 21:57:45 2013
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> CREATE SYNONYM DBMS_SYSTEM FOR SYS.DBMS_SYSTEM--做如下操作即可

你可能感兴趣的:(必须声明标识符 'DBMS_SYSTEM.SET_EV')