1)创建outline for CATEGORY default(sys用户):
CREATE OUTLINE scott2
ON SELECT empno,ename FROM scott.emp3 where empno=7788;
2)查询当前outline状态:
SQL> select name, category, owner,SQL_TEXT from dba_outlines;
NAME CATEGORY OWNER SQL_TEXT
------------------------------ ---------- ---------- ------------------------------
SCOTT2 DEFAULT SYS SELECT empno,ename FROM scott.
emp3 where empno=7788
3)让系统使用该outline,注意此声明对所有会话生效:
SQL> alter system set USE_STORED_OUTLINES = scott2;
或者只让某个会话生效:
SQL> alter session set USE_STORED_OUTLINES = scott2;
版权声明:本文为博主原创文章,未经博主允许不得转载。