DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: dbms_stats procedure privs

  1. #1
    Join Date
    Mar 2006
    Posts
    176

    dbms_stats procedure privs

    Hi all,

    I have a procedure, inside the procedure is DBMS_STATS package to update the stats, any way, the procedure was created in a DBA account to update stat on schemas named TEST in the database. If I run the procedure manually, proc ran ok; however, if I put the proc into the dbms_jobs to runt the proc then it failed. what privs am I missing???

    thanks,

  2. #2
    Join Date
    Jan 2001
    Posts
    3,134
    Execute on DBMS_STATS?
    I remember when this place was cool.

  3. #3
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    You're getting your privs from a role, not assigned directly to you. Find out what's in the role and that's what you need (more or less)...
    Jeff Hunter

  4. #4
    Join Date
    Mar 2006
    Posts
    176
    looking into the trace files, I think I have problem with dbms_stats.import_table_stats/ USER_STATTAB tables, I got the errors:

    ORA-12012: error on auto execute of job 218
    ORA-20000: Table USER_STATTAB does not exist or insufficient privileges
    ORA-06512: at "SYS.DBMS_STATS", line 4837
    ORA-06512: at "SYS.DBMS_STATS", line 5467


    what privilege do I need?

    thanks,

  5. #5
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    does the stat table exist?

  6. #6
    Join Date
    Mar 2006
    Posts
    176
    yes, table does exist and I even create the synonym pointing to that table.

  7. #7
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    have you been granted permission to it explicitly (ie. not through a role)?
    Jeff Hunter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width