Got a quick question from my favorite President today.
So basically, Monty was asking how to get a PL/SQL Package Spec & Body to:
- a single file
- with a SET DEFINE OFF
- with the schema prefix in the CREATE or REPLACE
Now, there’s more than one way to get one or more objects in the database out to a file. For just PL/SQL stuff, you have this on a right-click:
Now, you can use the ‘Save Package Spec and Body,’ but then you don’t get the schema prefix. Or, you could use the Export, but then you don’t have the option to include your ‘scripty’ stuff.
Now the Cart – that gives us the best of both worlds.
And this will give you the file that Monty wants…mostly.
Ok, he also wanted to start the script with a SET SCAN OFF.
Just add your BEFORE CREATE script. Now, whatever I have in that script, will show up in the file that SQL Developer creates, right before the package spec code.
Nnormally, I don’t like publishing on a Friday, but when the President asks, the President gets!