Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: plustrace role

Re: plustrace role

From: Ying Hu <yhu_at_generalmicro.com>
Date: Tue, 05 Jan 1999 19:32:58 -0500
Message-ID: <3692AF3A.E7D60335@generalmicro.com>


Jerry Dy wrote:

> I wanted to use 'set autotrace on' on Oracle 8.0.4, but I get an error
> that plustrace role may not be set. But the role is not defined in the
> Oracle data dictionary. Which privileges are included in this role, or
> better yet, does Oracle come with a script that will define this role?
> Thanks!

There is a script called PLUSTRCE.SQL that comes with the installation. I do not remember the location of the script. It is somewhere under $ORACLE_HOME. After running the script as SYS, you can grant PLUSTRACE to users. In addition, a user with the PLUSTRACE role should also have a PLAN_TABLE (there is also a script on the server to create the table) to work with 'set autotrace on'. The PLUSTRCE.SQL script is included below:

rem
rem Copyright (c) 1995 Oracle Corporation. All Rights Reserved. rem
rem NAME
rem PLUSTRCE.SQL
rem
rem FUNCTION
rem Create a role with access to Dynamic Performance Tables rem for the SQL*Plus SET AUTOTRACE ... STATISTICS command rem
rem NOTES
rem This file must be run while logged-in as SYS. rem Catalog.sql must have been run before this file is run. rem
rem After this script has been run, each user requiring access to rem the AUTOTRACE feature should be granted the PLUSTRACE role by rem the DBA.
rem
rem MODIFIED (MM/DD/YY)
rem cjones 04/20/95 - created

set echo on

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

Hope this helps.

Ying-fen Hu Received on Tue Jan 05 1999 - 18:32:58 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US