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: Analyze Command and Privileges

Re: Analyze Command and Privileges

From: Brian Peasland <dba_at_remove_spam.peasland.com>
Date: Thu, 18 Sep 2003 19:20:35 GMT
Message-ID: <3F6A0583.CB724314@remove_spam.peasland.com>


IMO, a better way to do this is to use DBMS_STATS instead of ANALYZE. Create a stored procedure owned by a DBA user. In this stored proc, call DBMS_STATS to compute/estimate statistics however you want. Then grant privs on this stored proc to the user you want to run it. This way, they don't get ANALYZE ANY implicitly. Depending on your version (which isn't included) analyzing SYS objects is a bad idea. You can stop this from happening in your stored proc logic.

HTH,
Brian

JimS wrote:
>
> Hi all,
>
> I need some info from the Oracle gods. I want to implement the
> Analyze table command in a job stream that will be run from an
> automated process not belonging to the DB group.
>
> Question 1 - If I give the "Automated" user id access to the "ANALYZE
> ANY" command, do they have any other privileges that can screw up the
> database.
>
> Question 2 - If the ANALYZE command aborts during execution, can it
> create major damage to the database.
>
> Thanks,
>
> Jim

-- 
===================================================================

Brian Peasland
dba_at_remove_spam.peasland.com

Remove the "remove_spam." from the email address to email me.


"I can give it to you cheap, quick, and good. Now pick two out of
 the three"
Received on Thu Sep 18 2003 - 14:20:35 CDT

Original text of this message

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