The following will show you how to use the explain plan:[@more@]
--通过以下方法可以把Autotrace的权限授予Everyone,
--如果你需要限制Autotrace权限,可以把对public的授权改为对特定user的授权。
connect sys as sysdba
@E:oracle10.2.0db_1RDBMSADMINutlxplan
--create public synonym plan_table for plan_table;
grant all on plan_table to public ;
@E:oracle10.2.0db_1sqlplusadminplustrce
/*
drop role plustrace;
create role plustrace;
grant select on v_$sesstat to plustrace;
grant select on v_$statname to plustrace;
grant select on v_$session to plustrace;
grant plustrace to dba with admin option;
set echo off ;
*/
--DBA用户首先被授予了plustrace角色,然后我们可以把plustrace授予public
--这样所有用户都将拥有plustrace角色的权限.
grant plustrace to public ;
--然后我们就可以使用AutoTrace的功能了.
connect eqsp/eqsp
set autotrace on
set timing on
--如果你需要限制Autotrace权限,可以把对public的授权改为对特定user的授权。
connect sys as sysdba
@E:oracle10.2.0db_1RDBMSADMINutlxplan
--create public synonym plan_table for plan_table;
grant all on plan_table to public ;
@E:oracle10.2.0db_1sqlplusadminplustrce
/*
drop role plustrace;
create role plustrace;
grant select on v_$sesstat to plustrace;
grant select on v_$statname to plustrace;
grant select on v_$session to plustrace;
grant plustrace to dba with admin option;
set echo off ;
*/
--DBA用户首先被授予了plustrace角色,然后我们可以把plustrace授予public
--这样所有用户都将拥有plustrace角色的权限.
grant plustrace to public ;
--然后我们就可以使用AutoTrace的功能了.
connect eqsp/eqsp
set autotrace on
set timing on
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10484922/viewspace-975070/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10484922/viewspace-975070/