用scott用户登录,想打开执行计划,报错
C:\Documents and Settings\Administrator>sqlplus scott/scott
SQL*Plus: Release 10.2.0.1.0 - Production on 星期一 5月 30 14:05:56 2011
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> set autotrace on
SP2-0618: 无法找到会话标识符。启用检查 PLUSTRACE 角色
SP2-0611: 启用 STATISTICS 报告时出错。
解决方法:执行plustrce.sql脚本,建立plustrace角色,并赋权给public.
SQL> conn / as sysdba
SQL> drop role plustrace;
SQL> create role plustrace;
角色已创建。
SQL>
SQL> grant select on v_$sesstat to plustrace;
授权成功。
SQL> grant select on v_$statname to plustrace;
授权成功。
SQL> grant select on v_$mystat to plustrace;
授权成功。
SQL> grant plustrace to dba with admin option;
授权成功。
SQL>
SQL> set echo off
SQL> grant plustrace to public;
授权成功。
SQL> conn scott/scott
已连接。
SQL> set autotrace on ------可以了