No option to edit package body

Hi,

 

I must be doing something very wrong but I can't seem to be able to edit packages - or rather, I can't seem to be able to edit the package body. In the "Database" pane, I can expand the packages folder with this listing all of the packages and also the functions that are defined within. I can also right-click and the context menu allows me to select "Package Editor", which opens up the package definition in the editor. I am, however, unable to edit the body of the package and can't find an option to do that anywhere within datagrip.

Strangely enough, a colleague that also has datagrip shows a slightly different Database pane in that when he expands a package, he not only sees the package definition but also a second hierarchy where he can drill into the package body (whereas in my pane, I can only expand the top level of the package). Any help with what I'm missing would be much appreciated.

 *edit - DataGrip 2016.2*

 

Thanks heaps

9 comments
Comment actions Permalink

Hello Magnus,

What database are you working with? Please attach screenshot, showing the problem.

Please also make sure your Data Source is not marked as Read-Only in Data Source settings dialog.

1
Comment actions Permalink

I had the same problem. It looks like Data Grip needs specific privilege to display package body.

I have Oracle 11g database. Dev server grants everything - so I can see package bodies. But QA server gives my user limited rights. So I can't see package bodies, only headers.

However if I install plugin to Datagrip - DataBase Navigator - I can see pacakge body using the same user.

In addition to that. Accessing same QA database with SQL Developer - shows me package bodies.

 

to Andrey,

Is it possible to know which permission should a user have in order to see package bodies in DataGrip?

2
Comment actions Permalink

Thanks to both for your replies - apologies also for not getting back sooner.

I too am connecting to Oracle 11g and the data source is not opened as read only - I can see and edit the package bodies using the same user in SQL Developer but, again, in Datagrip I can only edit the package declaration.

Kind regards

 

0
Comment actions Permalink

I had had the same problem with IntelliJ IDEA 2016.3 EAP. Turning off "Introspect using JDBC Metadata" checkbox in the datasource's options panel fixed it.

 

0
Comment actions Permalink

I have completely same issue as Magnus.
Connecting to 12c, Only option available is package editor that opens only package specification. No way to get to package body editor. 

Introspect using JDBC metadata is off
Grants does not matter (user has DBA role even)
Data source is not read-only

IJIdea 2016.3

0
Comment actions Permalink

I believe Idea/DataGrip queries all_source to get package body text, and it should query dba_source if it's available.

For instance, PL/SQL Developer has a checkbox "use dba views if available", Idea/DataGrip should have the same, or, better yet, use dba views if available by default.

0
Comment actions Permalink

I have this same issue.  As one user I cannot see the package body, but as the schema owner I can.  It would be nice to have a fix or work around.

This is actually a pretty big deal.  I cannot get my team to adopt DataGrip because this is such a hindrance in day to day work.

0
Comment actions Permalink

I solve my problem with Generate DDL to Console on package body and compile it!

0
Comment actions Permalink

Any updates here? 
Having the same issue.

0

Please sign in to leave a comment.