分配set autotrace 权限

来源:互联网 发布:linux输入法怎么用 编辑:程序博客网 时间:2024/05/02 02:58

SQL> connect sys as sysdba
请输入口令:
已连接。
SQL> @?\rdbms\admin\utlxplan  
(创建plan_table表)

表已创建。

SQL> create public synonym plan_table for plan_table;(创建全局同义词,不然用户看不见这个表,即使看的见,也是sys.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_$session to plustrace;

授权成功。

SQL> grant plustrace to dba with admin option;

授权成功。

SQL>
SQL> set echo off 

把(set  autotrace )权限给用户

SQL> grant plustrace to u;

0 0
原创粉丝点击