Is there a way to create new PL/SQL Packages, or to Export Existing Ones to File?

Hi,

I have been trying 0xDBE out on some work this week. Most of it has been on PL/SQL packages in an Oracle DB. Today I had to create a new package. Not being able to find out where/how to create a new package, I used our other tool (which I am hoping to replace with 0xDBE). I then wanted to export the new package out to file. Again, because I could not find how to do it in 0xDBE, I used our old tool.

My question is: where do I go to create a new PL/SQL package? And where can I export an existing package to file?

Thanks,

Dylan

2 comments
Comment actions Permalink

Dylan, I urge caution.  0xDBE is pretty and has promise.  Below that, I'm sure there are dragons!  I lost half a day when 0xDBE seemed to reorder a bit of the source for one of my packages when opened from the DB view.  It also doesn't display existing packages correctly even once you use "Code, Format" (which may be what messed with my package body's code to begin with).  Also, it has no function or button that explicitly "creates" a package (that I know of).

That said, I suspect you could:

* make a new SQL file in your project's path
* use package creation DDL in that file
* *run* that file

create or replace package ...
begin

end;

create or replace package body ...
begin

end;

To make a new package and its body.  I haven't done this approach yet, having merely opened "modules" from the DB view.  Oracle's own tools have some option that syncs package text with files on disk, but I haven't delved into that.  I believe the focus there is versioning.

As for PL/SQL script, I've been able to do stuff like this in SQL files:

declare
    ...
begin

end;
/

That works quite well.  0xDBE has I think a ways to go to really support this kind of work with debugging and the like.

0
Comment actions Permalink

Hey,

Maybe you could try the Database Navigator plugin. I am an Oracle developer and switched completely to Intellij (and waiting for a stable 0xDBE), using the Database Navigator plugin, which works in both Intellij and 0xDBE.
The schema browser and editor are actually great. you can find it here

regards,
Peter

0

Please sign in to leave a comment.