高手帮忙看看 我不能设置查看执行计划

[复制链接]
查看11 | 回复5 | 2005-10-30 17:05:33 | 显示全部楼层 |阅读模式
为什么我不能设置查看执行计划
SQL> conn system/oracle
Connected.
SQL> drop table plan_table;
Table dropped.
SQL> start ?\rdbms\admin\utlxplan
Table created.
SQL> grant all on plan_table to public;
Grant succeeded.
SQL> start ?\sqlplus\admin\plustrce
SQL>
SQL> drop role plustrace;
Role dropped.
SQL> create role plustrace;
Role created.
SQL>
SQL> grant select on v_$sesstat to plustrace;
grant select on v_$sesstat to plustrace

*
ERROR at line 1:
ORA-00942: table or view does not exist

SQL> grant select on v_$statname to plustrace;
grant select on v_$statname to plustrace

*
ERROR at line 1:
ORA-00942: table or view does not exist

SQL> grant select on v_$mystat to plustrace;
grant select on v_$mystat to plustrace

*
ERROR at line 1:
ORA-00942: table or view does not exist

SQL> grant plustrace to dba with admin option;
Grant succeeded.
SQL>
SQL> set echo off
SQL> grant plustrace to public;
Grant succeeded.
SQL> conn scott/tiger
Connected.
SQL> set autotrace on
SP2-0618: Cannot find the Session Identifier.Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report
SQL>
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
我用SYSTEM帐号连接时SET AUTOTRACE ON可以但是我用来查看EMP等默认表时提示表不存在这又是怎么回事
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
不错!
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
授权!!!!
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
关键授权不成功阿
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
我想,你的oracle一定是用10G的吧?
解决此问题很简单,您在start ?\sqlplus\admin\plustrce之前应conn / as sysdba
一定可以。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行