使用者autotrace 無法使用解決
SQL> set autotrace on
SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report
SQL> conn / as sysdba
Connected.
SQL> grant plustrace to scott;
grant plustrace to scott
*
ERROR at line 1:
ORA-01919: role 'PLUSTRACE' does not exist
SQL> @$ORACLE_HOME/sqlplus/admin/plustrce.sql
SQL>
SQL> drop role plustrace;
drop role plustrace
*
ERROR at line 1:
ORA-01919: role 'PLUSTRACE' does not exist
SQL> create role plustrace;
Role created.
SQL>
SQL> grant select on v_$sesstat to plustrace;
Grant succeeded.
SQL> grant select on v_$statname to plustrace;
Grant succeeded.
SQL> grant select on v_$mystat to plustrace;
Grant succeeded.
SQL> grant plustrace to dba with admin option;
Grant succeeded.
SQL>
SQL> set echo off
SQL> grant plustrace to scott;
Grant succeeded.
SQL> conn scott/oracel
ERROR:
ORA-01017: invalid username/password; logon denied
Warning: You are no longer connected to ORACLE.
SQL> conn scott/oracle
Connected.
SQL> set autotrace on;
SQL> select * from emp2 where empno=7788;
EMPNO ENAME JOB MGR HIREDATE SAL COMM
---------- ---------- --------- ---------- --------- ---------- ----------
DEPTNO
----------
7788 SCOTT ANALYST 7566 19-APR-87 1212
20
Execution Plan
----------------------------------------------------------
Plan hash value: 4075136777
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Ti
me |
--------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 87 | 2 (0)| 00
:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| EMP2 | 1 | 87 | 2 (0)| 00
:00:01 |
|* 2 | INDEX RANGE SCAN | EMP2_IND | 1 | | 1 (0)| 00
:00:01 |
--------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
2 - access("EMPNO"=7788)
Note
-----
- dynamic sampling used for this statement (level=2)
Statistics
----------------------------------------------------------
152 recursive calls
0 db block gets
23 consistent gets
0 physical reads
0 redo size
868 bytes sent via SQL*Net to client
419 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed
SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is enabled
SP2-0611: Error enabling STATISTICS report
SQL> conn / as sysdba
Connected.
SQL> grant plustrace to scott;
grant plustrace to scott
*
ERROR at line 1:
ORA-01919: role 'PLUSTRACE' does not exist
SQL> @$ORACLE_HOME/sqlplus/admin/plustrce.sql
SQL>
SQL> drop role plustrace;
drop role plustrace
*
ERROR at line 1:
ORA-01919: role 'PLUSTRACE' does not exist
SQL> create role plustrace;
Role created.
SQL>
SQL> grant select on v_$sesstat to plustrace;
Grant succeeded.
SQL> grant select on v_$statname to plustrace;
Grant succeeded.
SQL> grant select on v_$mystat to plustrace;
Grant succeeded.
SQL> grant plustrace to dba with admin option;
Grant succeeded.
SQL>
SQL> set echo off
SQL> grant plustrace to scott;
Grant succeeded.
SQL> conn scott/oracel
ERROR:
ORA-01017: invalid username/password; logon denied
Warning: You are no longer connected to ORACLE.
SQL> conn scott/oracle
Connected.
SQL> set autotrace on;
SQL> select * from emp2 where empno=7788;
EMPNO ENAME JOB MGR HIREDATE SAL COMM
---------- ---------- --------- ---------- --------- ---------- ----------
DEPTNO
----------
7788 SCOTT ANALYST 7566 19-APR-87 1212
20
Execution Plan
----------------------------------------------------------
Plan hash value: 4075136777
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Ti
me |
--------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 87 | 2 (0)| 00
:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| EMP2 | 1 | 87 | 2 (0)| 00
:00:01 |
|* 2 | INDEX RANGE SCAN | EMP2_IND | 1 | | 1 (0)| 00
:00:01 |
--------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
2 - access("EMPNO"=7788)
Note
-----
- dynamic sampling used for this statement (level=2)
Statistics
----------------------------------------------------------
152 recursive calls
0 db block gets
23 consistent gets
0 physical reads
0 redo size
868 bytes sent via SQL*Net to client
419 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29108064/viewspace-1126384/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 解決無法切換到jenkins使用者的問題Jenkins
- 使用者被鎖解決辦法
- 解決無法使用VI的問題
- Laravel + dingoapi + jwt 使用者認證無法正確指定 guard 的解決辦法LaravelGoAPIJWT
- w10無法新增新使用者怎麼解決_w10無法增加新使用者如何處理
- 解決非root使用者使用docker的辦法Docker
- windows7無法使用無線路由器的解決辦法Windows路由器
- 解決sqlserver資料庫單一使用者無法刪除的問題SQLServer資料庫
- 解決“飛鴿傳書”無法顯示區域網使用者的方法
- OpenSSH普通使用者無法登入的幾種情況的解決方法
- aix 下 無法使用backspace鍵的解決方法。AI
- 解決 Xshell 無法使用 zsh 的 prompt style
- win10 刪除使用者無法在內建賬戶怎麼解決Win10
- 檔案無法粉碎解決辦法
- ebs系統 客戶端使用 pl/sql developer 無法以sys使用者登入解決方法客戶端SQLDeveloper
- 普通使用者SSH無密碼互信建立 出現的問題以及解決辦法密碼
- su報無法設定使用者ID和資源暫時不可用解決
- JSP中無法使用內建物件解決方法JS物件
- 使用PorterDuff解決clipPath無法抗鋸齒問題
- Win8無法使用LOL盒子的解決方法
- FCKeditor2.2無法使用上傳功能的解決!
- ORACLE12.2中使用者無法登陸報ORA-01017的解決辦法Oracle
- php通過createuser和grant命令無法建立資料庫使用者和授權的解決辦法PHP資料庫
- UiBot無法抓取Chrome元素和資料抓取工具無法使用的解決方案UIChrome
- 解決Moodle在上傳使用者時無法自動傳送賬號密碼郵件密碼
- 以scott使用者執行set autotrace 出錯
- 解決 httprunner2 無法使用 extent_report_templateHTTP
- win10 workstation 服務無法使用怎麼解決Win10
- 手動下載 Chrome,解決 puppeteer 無法使用問題Chrome
- 解決微信小程式 wxml檔案無法使用js方法微信小程式XMLJS
- goland中npm無法使用的問題及解決方法GoLandNPM
- 解決jequry使用keydown無法跳轉的問題
- 解決:angular js模板中無法使用ueditor的問題AngularJS
- docker ubuntu 的vi,nano命令無法使用的解決方案DockerUbuntuNaN
- 【PyCharm】解決虛擬環境pip無法使用問題PyCharm
- 印表機驅動程式無法使用怎麼解決 印表機驅動程式無法使用w10
- 解決 Windows 無法訪問共享Windows
- 解決Spark叢集無法停止Spark