SP2-0618: 無法找到會話識別符號。啟用檢查 PLUSTRACE 角色

murkey發表於2013-12-18

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. 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 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. All rights reserved.


連線到:
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. 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 autot trace
SQL> select * from test;

已選擇102行。


執行計劃
----------------------------------------------------------
Plan hash value: 4122059633

---------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
---------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 102 | 2448 | 3 (0)| 00:00:01 |
| 1 | TABLE ACCESS FULL| TEST1 | 102 | 2448 | 3 (0)| 00:00:01 |
---------------------------------------------------------------------------

Note
-----
- dynamic sampling used for this statement


統計資訊
----------------------------------------------------------
140 recursive calls
0 db block gets
42 consistent gets
1 physical reads
0 redo size
2566 bytes sent via SQL*Net to client
451 bytes received via SQL*Net from client
8 SQL*Net roundtrips to/from client
5 sorts (memory)
0 sorts (disk)
102 rows processed

SQL>

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/500314/viewspace-1063679/,如需轉載,請註明出處,否則將追究法律責任。

相關文章