首页 > Linux操作系统 > Linux操作系统 > 启用autotrace功能
SQL*Plus: Release 9.2.0.8.0 - Production on 星期二 12月 25 21:42:36 2007
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> conn / as sysdba;
已连接。
SQL> @?/rdbms/admin/utlxplan
表已创建。
SQL> create public synonym plan_table for plan_table;
同义词已创建。
SQL> grant all on plan_table to public;
授权成功。
SQL> @?/sqlplus/admin/plustrce;
SQL>
SQL> drop role plustrace;
drop role plustrace
*
ERROR 位于第 1 行:
ORA-01919: 角色'PLUSTRACE'不存在
SQL> create role plustrace;
角色已创建
SQL>
SQL> grant select on v_$sesstat to plustrace;
授权成功。
SQL> grant select on v_$statname to plustrace;
授权成功。
SQL> grant select on v_$mystat to plustrace;
授权成功。
SQL> grant plustrace to dba with admin option;
授权成功。
SQL>
SQL> set echo off
SQL> grant plustrace to public;
授权成功。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12361284/viewspace-1329/,如需转载,请注明出处,否则将追究法律责任。