what perms ami missing 2005-12-16 - By Fuad Arshad
i'm tryingto setup a job to gather schema stats for a schema. it runs perfectly when i run this thru sqlplus / the user running this has dba,analyze any and select catalog role but whn i put this in dbms_jobs .this is what i get . the database is 9.2.0.7 -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- --41 DECLARE X NUMBER; BEGIN SYS.DBMS_JOB.SUBMIT ( job => X ,what => 'BEGIN SYS.DBMS_STATS.GATHER_SCHEMA_STATS ( OwnName => ''schemaname'' ,Granularity => ''PARTITION'' ,Options => ''GATHER AUTO'' ,Gather_Temp => FALSE ,DEGREE => 4 ,CASCADE => TRUE ,No_Invalidate => TRUE); END; ' ,next_date => to_date('01/01/4000 00:00:00','dd/mm/yyyy hh24:mi:ss') ,interval => 'SYSDATE+30/1440 ' ,no_parse => FALSE ); END; / -- ---- ---- ---- ------ ORA-12012 (See ORA-12012.ora-code.com): error on auto execute of job 41 ORA-01031 (See ORA-01031.ora-code.com): insufficient privileges ORA-06512 (See ORA-06512.ora-code.com): at "SYS.DBMS_STATS", line 10301 ORA-06512 (See ORA-06512.ora-code.com): at "SYS.DBMS_STATS", line 10784 ORA-06512 (See ORA-06512.ora-code.com): at "SYS.DBMS_STATS", line 10949 ORA-06512 (See ORA-06512.ora-code.com): at "SYS.DBMS_STATS", line 11036 ORA-06512 (See ORA-06512.ora-code.com): at "SYS.DBMS_STATS", line 11013 ORA-06512 (See ORA-06512.ora-code.com): at line 2
the user running this has dba,analyze any and select catalog role Any ideas
<DIV id=RTEContent><FONT color=#0000f0 size=2> <div>i'm tryingto setup a job to gather schema stats for a schema.</div> <div>it runs perfectly when i run this thru sqlplus /</div> <div>the user running this has dba,analyze any and select catalog role </div> <div>but whn i put this in dbms_jobs .this is what i get . the database is 9.2.0.7</div> <div> </div> <div>--- -- ---- ---- ---- ---- ---- ---- ---- ---- ---- -----</div> <div>--41 </div> <div>DECLARE<BR> X NUMBER;<BR>BEGIN<BR> SYS.DBMS_JOB.SUBMIT<BR>  ; ( job => X <BR> ,what => 'BEGIN<BR> SYS.DBMS_STATS.GATHER_SCHEMA _STATS (<BR> OwnName => ''schemaname''<BR> ,Granularity => ''PARTITION''<BR> ,Options => ' 'GATHER AUTO''<BR> ,Gather_Temp => FALSE<BR> ,DEGREE => 4<BR> ,CASCADE  ; => TRUE<BR> ,No_Invalidate => TRUE);<BR>END;</div> <div><BR>'<BR> ,next_date => to_date('01/01/4000 00:00:00','dd/mm /yyyy hh24:mi:ss')<BR> ,interval => 'SYSDATE+30/1440 '<BR> ,no_parse => FALSE<BR> );<BR>END;<BR>/</div> <div>- -- ---- ---- ---- -----</div> <div>ORA-12012 (See ORA-12012.ora-code.com): error on auto execute of job 41 <BR>ORA-01031 (See ORA-01031.ora-code.com): insufficient privileges<BR>ORA-06512 (See ORA-06512.ora-code.com): at "SYS.DBMS_STATS", line 10301<BR>ORA-06512 (See ORA-06512.ora-code.com): at "SYS.DBMS_STATS", line 10784<BR>ORA-06512 (See ORA-06512.ora-code.com): at "SYS.DBMS _STATS", line 10949<BR>ORA-06512 (See ORA-06512.ora-code.com): at "SYS.DBMS _STATS", line 11036<BR>ORA-06512 (See ORA-06512.ora-code.com): at "SYS.DBMS_STATS", line 11013<BR>ORA-06512 (See ORA-06512.ora-code.com): at line 2<BR></div> <div>the user running this has dba,analyze any and select catalog role </div> <div> </div> <div> </div></FONT><FONT size=2 >Any ideas </FONT></DIV>
|
|