SP2-0618: 无法找到会话标识符。启用检查 PLUSTRACE 角色
C:\>sqlplus test/test@orcl
SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 3月 12 10:34:08 2009
Copyright (c) 1982, 2005, Oracle.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> set autot trace;
SP2-0618: 无法找到会话标识符。启用检查 PLUSTRACE 角色
SP2-0611: 启用 STATISTICS 报告时出错
C:\>sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 3月 12 10:11:58 2009
Copyright (c) 1982, 2005, Oracle.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> @D:\oracle\product\10.2.0\db_1\sqlplus\admin\plustrce.sql
SQL>
SQL> drop role plustrace;
drop role plustrace
第 1 行出现错误:
ORA-01919: 角色 '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 test;
授权成功。
SQL>
C:\>sqlplus test/test@orcl
SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 3月 12 10:34:08 2009
Copyright (c) 1982, 2005, Oracle.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> set autot trace
SQL> select * from test;
已选择102行。
执行计划
----------------------------------------------------------
Plan hash value: 4122059633
---------------------------------------------------------------------------
| Id
---------------------------------------------------------------------------
|
|
---------------------------------------------------------------------------
Note
-----
统计信息
----------------------------------------------------------