|
|
用一个实例讲解如何生成autotrace权限
( 2008/4/3 09:58 )
生成autotrace权限的示例: 一、配置autotrace 1、cd [ORACLE_HOME]/rdbms/admin; 2、以system用户登陆; 3、执行@utlxplan; 4、执行create public synonym plan_table for plan_table; 5、执行 grant all on plan_table to public; 二、创建plustrace角色 1、cd [ORACLE_HOME]/sqlplus/admin; 2、以sys或sysdba登陆; 3、运行@plustrce; 4、执行grant plustrace to public; 注:也可以将public指定为某个用户。 [oracle@olivenan oracle]$ cd $ORACLE_HOME/rdbms/admin/ [oracle@olivenan admin]$ sqlplus system/oracle SQL*Plus: Release 9.2.0.4.0 - Production on Wed Jun 27 11:00:20 2007 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.4.0 - Production SQL> @utlxplan Table created. SQL> create public synonym plan_table for plan_table; Synonym created. SQL> grant all on plan_table to public; Grant succeeded. SQL> exit Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.4.0 - Production [oracle@olivenan admin]$ cd $ORACLE_HOME/sqlplus/admin [oracle@olivenan admin]$ sysplus "/as sysdba" -bash: sysplus: command not found [oracle@olivenan admin]$ sqlplus "/as sysdba" SQL*Plus: Release 9.2.0.4.0 - Production on Wed Jun 27 11:04:55 2007 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.4.0 - Production SQL> @plustrce SQL> SQL> drop role plustrace; drop role plustrace * ERROR at line 1: ORA-01919: role 'PLUSTRACE' does not exist
SQL> create role plustrace; Role created. SQL> SQL> grant select on v_$sesstat to plustrace; Grant succeeded. SQL> grant select on v_$statname to plustrace; Grant succeeded. SQL> grant select on v_$mystat to plustrace; Grant succeeded. SQL> grant plustrace to dba with admin option; Grant succeeded. SQL> SQL> set echo off SQL> grant plustrace to public; Grant succeeded. SQL> 至此,执行成功。
|
热议文章·消息称中国移动获批188号段用于TD (7-4) 评:实行不对称监管,也是针对2G3G或者TD是最需要扶持的,超过了其他。 ·中移动独占70%移动用户市场考验重组后监管 (7-4) ·网通员工转网基本完成 联通员工转G网尚未实施 (7-3) ·中电信小灵通转C网无海外经验可借鉴 (7-3) ·中国网通集体更换手机号码 使用156号段 (7-2) ·广东电信称封杀“一拖N” 不针对家庭用户 (7-4) ·LTE-SAE体系结构及性能剖析(上) (7-4) ·烽火科技FONST长途传输解决方案 (7-4) ·深入分析 网吧网络常见问题与解决方案 (7-4) ·信息安全越来越受到重视 防范木马入侵成热点 (7-4) ·IE 8测试版新增安全功能 阻止隐蔽强迫下载 (7-4) |
||||||||||||||||||
|