Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2002
    Posts
    20

    Question Unanswered: ANALYZE TABLE permissions

    Hi,

    If I use ANALYSE table by mySchema - what permission needs to be on the otherSchema.table to execute this command?

    EXECUTE IMMEDIATE 'ANALYZE TABLE [otherSchema.table] COMPUTE STATISTICS FOR ALL COLUMNS'

    Thanks!

  2. #2
    Join Date
    Jul 2003
    Posts
    2,296
    use the dbms_stats package

    exec dbms_stats.gather_table_stats('owner','tablename') ;

    exec dbms_stats.gather_schema_stats('owner');

    if you want to analyze all objectas for an owner the gather_schema_stats is great.

    regardless, the 'analyze any' system privilege is what you are looking for.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

Posting Permissions

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