Heim  >  Artikel  >  Datenbank  >  SP2-0611:ErrorenablingSTATISTICSreport

SP2-0611:ErrorenablingSTATISTICSreport

WBOY
WBOYOriginal
2016-06-07 15:23:101430Durchsuche

今天是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>

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn