Edit Oracle Package Body in DataGrip 2023.2

Hi,

I am using DataGrip 2023.2 with Oracle 19c OnPrem Database (Oracle E-business Suite R12.2.11). I have full APPS access to my database and able to perform SQL queries. However, my intention is to open existing packages and make code changes in it. 

Unfortunately even after lot of trial and error and online research, I am not able to open any package specification or body in the editor. I can see the package in the database explorer but when I double click it or use Go To Implementation or Go To Declaration, only below mentioned opens up in the console editor and does not show any code in it. Maybe I am doing something wrong, but I have run out of options to figure it out, hence seeking help. 

Introspection keeps on running without any results. 

-- auto-generated definition
create package AMS_ADI_PRETTY_URL_PVT as
    -- no source code
-- CREATE_PRETTY_URL:routine
end AMS_ADI_PRETTY_URL_PVT
/

Is there a simple way to open an existing package spec and body from Oracle Database in DataGrip? e.g. in Toad for Oracle, you select the package name and press F4 to open the definition and then you have option to load that into editor for editing it. Similar functionality exists in all other Oracle Database IDE tools like SQL Developed, PLSQL Developer etc. 

1
8 comments

Abmitra

If the packages are listed in the database explorer, but their definitions are not presented when opened in the object editor, it's likely caused due to incomplete / failed introspection - a process used to synchronize the database objects with the source. To start investigating this, I'd first suggest to Refresh the data source and see if you're able to view the definitions of packages, including the package body. As a last resort, you can also Force Refresh the data source to rebuild the metadata and check the objects' DDL afterward 



If this doesn't work, please perform Forget Cached Schemas

 
and generate the Diagnostic Refresh log (see the second option from the drop-down in the screenshot above). Upload the log onto our FTP server and provide the upload ID in your reply.

0

Sure Aleksandr, I am giving it a try. I will let you know the outcome. 

Having said that, I have a question. Generally speaking, even if the IDE was not able to collect full metadata of schema, still it should allow me to open up the declaration directly in the editor, because at the end of the day it is connected to the database and should be able to pull up the object declaration. 

Like, in Toad, you can always press F4 to directly pull up the declaration of an object. 


 

0

Hi Aleksandr

I tried “Force Refresh”, but did not help. I am trying to redo using “Forget All Cached Schema”

0

Hi Aleksandr

With Forget Cache and reload, I still see the same problem. Also I do not see all packages in the database explorer, like I see packages in ALL_OBJECTS and also able to edit/open the same packages in Toad, but I do not see them in the database explorer in DataGrip and also there is no way to open up the declaration. 

Could you please help or show me a way out?

Thanks a lot for your response and help. 

0

Hi Aleksandr,

How do I upload the log file?

 

0

Sorry Abmitra , forgot to provide the link to our FTP server 

uploads.jetbrains.com/ 

Please include the upload id in your reply.

0

Hi,

Sorry for delayed response, please find the log here Upload id: 2023_09_06_2BwqFGQZs7nxtKRstWWhEv (file: DataGripLog.rtf)

Thanks

0
Sorry, but the upload id is invalid and presumably has been truncated. Please reupload and provide the upload id
0

Please sign in to leave a comment.