   |  | | Job to import system statistics - errors | Job to import system statistics - errors 2006-06-13 - By Smith, Steven K - MSHA
I'm stuck. Pulling my hair out. I have collected system statistics for day, night and weekend processing. I can interactively import system statistics with no problems: SQL->execute DBMS_STATS.IMPORT_SYSTEM_STATS(stattab => 'SYSTEM_STAT_TABLE', statid => 'DAYTIME', statown => 'SYSTEM'); PL/SQL procedure successfully completed. When I put that in an oracle job, It errors and the trace file is: ORA-12012 (See ORA-12012.ora-code.com): error on auto execute of job 2219 ORA-20000 (See ORA-20000.ora-code.com): Unable to import system statistics stats from user stat table SYSTEM. SYSTEM_STAT_TABLE: does not exist or insufficient privileges ORA-06512 (See ORA-06512.ora-code.com): at "SYS.DBMS_STATS", line 5575 ORA-06512 (See ORA-06512.ora-code.com): at line 1 *** 2006-06-13 09:55:33.659 ORA-12012 (See ORA-12012.ora-code.com): error on auto execute of job 2219 ORA-20000 (See ORA-20000.ora-code.com): Unable to import system statistics stats from user stat table SYSTEM. SYSTEM_STAT_TABLE: does not exist or insufficient privileges ORA-06512 (See ORA-06512.ora-code.com): at "SYS.DBMS_STATS", line 5575 ORA-06512 (See ORA-06512.ora-code.com): at line 1 I have given myself explicit privileges to the system.system_stat_table: 1 select grantee, owner, table_name, privilege 2 from dba_tab_privs 3* where table_name = 'SYSTEM_STAT_TABLE' GRANTEE OWNER TABLE_NAME PRIVILEGE -- ---- ---- ---- ---- ---- -- -- ---- ---- -- -- ---- ---- ---- ---- -- -- ---- ---- ---- -- SSMITH SYSTEM SYSTEM_STAT_TABLE ALTER SSMITH SYSTEM SYSTEM_STAT_TABLE DELETE SSMITH SYSTEM SYSTEM_STAT_TABLE INDEX SSMITH SYSTEM SYSTEM_STAT_TABLE INSERT SSMITH SYSTEM SYSTEM_STAT_TABLE SELECT SSMITH SYSTEM SYSTEM_STAT_TABLE UPDATE SSMITH SYSTEM SYSTEM_STAT_TABLE REFERENCES
II also have granted ssmith GATHER_SYSTEM_STATISTICS role. Any ideas? Steve
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1528" name=GENERATOR></HEAD> <BODY> <DIV><SPAN class=789061918-13062006><FONT face=Arial color=#0000ff size=2>I'm stuck. Pulling my hair out.</FONT></SPAN></DIV> <DIV><SPAN class=789061918-13062006><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV> <DIV><SPAN class=789061918-13062006><FONT face=Arial color=#0000ff size=2>I have collected system statistics for day, night and weekend processing. </FONT></SPAN></DIV> <DIV><SPAN class=789061918-13062006><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV> <DIV><SPAN class=789061918-13062006><FONT face=Arial color=#0000ff size=2>I can interactively import system statistics with no problems:</FONT></SPAN></DIV> <DIV><SPAN class=789061918-13062006><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV> <DIV><SPAN class=789061918-13062006><FONT face=Arial color=#0000ff size=2>SQL->execute DBMS_STATS.IMPORT_SYSTEM_STATS(stattab => 'SYSTEM_STAT_TABLE', statid => 'DAYTIME', statown => 'SYSTEM');</FONT></SPAN></DIV> <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV> <DIV><SPAN class=789061918-13062006><FONT face=Arial color=#0000ff size=2>PL /SQL procedure successfully completed.</FONT></SPAN></DIV> <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV> <DIV><SPAN class=789061918-13062006><FONT face=Arial color=#0000ff size=2>When I put that in an oracle job, It errors and the trace file is:</FONT></SPAN></DIV> <DIV><SPAN class=789061918-13062006><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV> <DIV><SPAN class=789061918-13062006><FONT face=Arial color=#0000ff size=2>ORA-12012 (See ORA-12012.ora-code.com): error on auto execute of job 2219<BR>ORA-20000 (See ORA-20000.ora-code.com): Unable to import system statistics stats from user stat table SYSTEM.<BR>SYSTEM_STAT_TABLE: does not exist or insufficient privileges<BR>ORA-06512 (See ORA-06512.ora-code.com): at "SYS.DBMS_STATS", line 5575<BR>ORA-06512 (See ORA-06512.ora-code.com): at line 1<BR>*** 2006-06-13 09:55:33.659<BR>ORA-12012 (See ORA-12012.ora-code.com): error on auto execute of job 2219<BR>ORA-20000 (See ORA-20000.ora-code.com): Unable to import system statistics stats from user stat table SYSTEM.<BR>SYSTEM_STAT_TABLE: does not exist or insufficient privileges<BR>ORA-06512 (See ORA-06512.ora-code.com): at "SYS.DBMS_STATS", line 5575<BR>ORA-06512 (See ORA-06512.ora-code.com): at line 1</FONT></SPAN></DIV> <DIV><SPAN class=789061918-13062006><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV> <DIV><SPAN class=789061918-13062006> </DIV> <DIV><SPAN class=789061918-13062006></SPAN><FONT face=Arial color=#0000ff size=2>I<SPAN class=789061918-13062006> have given myself explicit privileges to the system.system_stat_table:</SPAN></FONT></DIV> <DIV><FONT face=Arial color=#0000ff size=2><SPAN class=789061918-13062006></SPAN></FONT> </DIV> <DIV><FONT face=Arial color=#0000ff size=2><SPAN class=789061918-13062006>  ; 1 select grantee, owner, table_name, privilege<BR> 2 from dba_tab_privs<BR> 3* where table_name = 'SYSTEM_STAT_TABLE'</SPAN></FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial><SPAN class=789061918-13062006><FONT face=Courier color=#0000ff size=2>GRANTEE   ; OWNER TABLE_NAME PRIVILEGE<BR>-- ---- ---- ---- ---- ---- -- -- ---- ---- -- -- ---- ---- ---- ---- -- -- ---- ---- ---- --<BR>SSMITH SYSTEM SYSTEM_STAT_TABLE ALTER<BR>SSMITH SYSTEM SYSTEM_STAT _TABLE DELETE<BR>SSMITH SYSTEM SYSTEM_STAT _TABLE INDEX<BR>SSMITH  ; SYSTEM SYSTEM_STAT _TABLE INSERT<BR>SSMITH SYSTEM SYSTEM_STAT _TABLE SELECT<BR>SSMITH SYSTEM SYSTEM_STAT _TABLE UPDATE<BR>SSMITH SYSTEM SYSTEM_STAT _TABLE REFERENCES<BR></FONT ></SPAN></DIV> <DIV><SPAN class=789061918-13062006></SPAN><FONT color=#0000ff><FONT size=2>I<SPAN class=789061918-13062006>I also have </SPAN>g<SPAN class=789061918-13062006>ranted ssmith GATHER_SYSTEM_STATISTICS role.</SPAN></FONT></FONT></DIV> <DIV><FONT color=#0000ff><FONT size=2><SPAN class=789061918-13062006></SPAN></FONT></FONT> </DIV> <DIV><FONT color=#0000ff><FONT size=2><SPAN class=789061918-13062006>Any ideas?</SPAN></FONT></FONT></DIV> <DIV><FONT color=#0000ff><FONT size=2><SPAN class=789061918-13062006></SPAN></FONT></FONT> </DIV> <DIV><FONT color=#0000ff><FONT size=2><SPAN class=789061918-13062006>Steve</SPAN></FONT></FONT></FONT></SPAN></DIV></BODY>< /HTML>
|
|
 |