Home  >  Article  >  Database  >  SP2-0611:ErrorenablingSTATISTICSreport

SP2-0611:ErrorenablingSTATISTICSreport

WBOY
WBOYOriginal
2016-06-07 15:23:101429browse

今天是2014-01-08,在开启autotrace的时候报如下错误,解决过程如下: SQL conn scott/root Connected. SQL SQL SQL set autotrace trace statistics Error ORA-942 while gathering statistics SP2-0611: Error enabling STATISTICS report SQL SQL SQL set

今天是2014-01-08,在开启autotrace的时候报如下错误,解决过程如下:

SQL> conn scott/root
Connected.
SQL>
SQL>
SQL> set autotrace trace statistics
Error ORA-942 while gathering statistics
SP2-0611: Error enabling STATISTICS report
SQL>
SQL>
SQL> set autotrace
Usage: SET AUTOT[RACE] {OFF | ON | TRACE[ONLY]} [EXP[LAIN]] [STAT[ISTICS]]
SQL> set autotrace trace
Error ORA-942 while gathering statistics
SP2-0611: Error enabling STATISTICS report
SQL> conn sys/root as sysdba
Connected.
SQL>
SQL>
SQL> !oerr ora 942
00942, 00000, "table or view does not exist"
// *Cause:
// *Action:

SQL> grant select on v_$sesstat to scott;
g
Grant succeeded.

SQL> rant select on v_$statname to scott;

Grant succeeded.

SQL> grant select on v_$mystat to scott;

Grant succeeded.

SQL>
SQL>
SQL> conn scott/root
Connected.
SQL>
SQL>
SQL> set autotrace trace
SQL>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn