Showing posts with label Oracle grant statistics insufficient privileges. Show all posts
Showing posts with label Oracle grant statistics insufficient privileges. Show all posts

Friday, June 13, 2008

Privileges to analyze another schema

Yesterday I wrote a small stored procedure to gather statistics for several schemas at a customer's site.
The procedure was very simple, but trying it gaves me error:
ORA-01031 insufficient privileges

I checked that the user I was using had the "analyze any" right. To be sure I granted it again.
But I still got the error.
The database was a 9.2.0.8. Even here Metalink at the rescue, with note 203220.1.
It turned out that there was a bug. The workaround to be applied was quite obvious:
grant select any table to my user.
Not the best from the security point of view, but it fits my needs..
So, once again, thanks Metalink!