receiving "insufficient privileges on underlying objects of the view: EXPLAIN PLAN FOR"

382 views
Skip to first unread message

Liam Morley

unread,
Feb 8, 2012, 4:16:46 PM2/8/12
to Oracle enhanced adapter for ActiveRecord
I've been using the 1.3.x gem of activerecord-oracle_enhanced-adapter
with Rails 2.3 pretty successfully (thank you!), but I'm investigating
upgrading to Rails 3.2 right now. My Gemfile is pulling directly from
the github.com/rsim/oracle-enhanced.git master branch, version ~1.4.0.

I'm trying a find_by_sql command that worked fine in Rails 2.3, but
now is producing an error:

OCIError: ORA-01039: insufficient privileges on underlying objects of
the view: EXPLAIN PLAN FOR

This is an external database, so I can't change the privileges. Is
there a way that the 1.4.x gem can recover from this and do the same
thing that 1.3 would do?

Yasuo Honda

unread,
Feb 8, 2012, 4:33:28 PM2/8/12
to oracle-...@googlegroups.com
Hi,

>>
config.active_record.auto_explain_threshold_in_seconds = nil
<<

Then Rails will not automatically executes explain command.

--
Yasuo Honda

> --
> You received this message because you are subscribed to the Google Groups "Oracle enhanced adapter for ActiveRecord" group.
> To post to this group, send email to oracle-...@googlegroups.com.
> To unsubscribe from this group, send email to oracle-enhanc...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/oracle-enhanced?hl=en.
>

Liam Morley

unread,
Feb 9, 2012, 11:16:24 AM2/9/12
to Oracle enhanced adapter for ActiveRecord
Ah, so this is an artifact of upgrading to Rails 3.2 - sorry about
that. I commented out the 'auto_explain' line in development.rb and
everything is much better. Thanks!

Liam
Reply all
Reply to author
Forward
0 new messages