ora-01039错误处理

1,以sysdba进行如下授权给运行set autotrace 结果出错的用户
grant select any table to scott;
grant select any tab to scott;
alter system set O7_DICTIONARY_ACCESSIBILITY=true scope=spfile;

2,重启数据库

3,再次运行set autotrace traceonly exp stat

  附上结果如下:
SQL> conn scott/system
Connected.
SQL> set autotra
Usage: SET AUTOT[RACE] {OFF | ON | TRACE[ONLY]} [EXP[LAIN]] [STAT[ISTICS]]
SQL> set autotrace traceonly exp stat
SQL> select * from tab;


Execution Plan
----------------------------------------------------------
Plan hash value: 457676135

--------------------------------------------------------------------------------
| Id  | Operation             | Name   | Rows  | Bytes | Cost (%CPU)| Time     |
--------------------------------------------------------------------------------
|   0 | SELECT STATEMENT      |        |   998 | 78842 |   113   (1)| 00:00:02 |
|   1 |  NESTED LOOPS OUTER   |        |   998 | 78842 |   113   (1)| 00:00:02 |
|*  2 |   TABLE ACCESS FULL   | OBJ$   |   998 | 72854 |    26   (4)| 00:00:01 |
|   3 |   TABLE ACCESS CLUSTER| TAB$   |     1 |     6 |     1   (0)| 00:00:01 |
|*  4 |    INDEX UNIQUE SCAN  | I_OBJ# |     1 |       |     0   (0)| 00:00:01 |
--------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   2 - filter("O"."TYPE#"<=5 AND "O"."OWNER#"=USERENV('SCHEMAID') AND
              "O"."TYPE#">=2 AND "O"."LINKNAME" IS NULL)
   4 - access("O"."OBJ#"="T"."OBJ#"(+))


Statistics
----------------------------------------------------------
          0  recursive calls
          0  db block gets
          0  consistent gets
          0  physical reads
          0  redo size
          0  bytes sent via SQL*Net to client
          0  bytes received via SQL*Net from client
          0  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
          4  rows processed

SQL>

请使用浏览器的分享功能分享到微信等