For a project with Oracle Portal, I had to do some lookups in packages and procedures on the database to get some information about the project. Since I wasn’t working full-time for this project I had no access to the DB, except via the portal itself.
Several times I had the problem that the client wanted a quick answer for his question, but therefor I needed to dig into the code that was developed in the past. The problem was that the size for editing/viewing a package or procedure was limited to 30K and since there where several packages bigger than 30K, I couldn’t give them a quick answer.
If you only want to read the packages(not edit), there is a very easy portal solution for this problem:
You just have to create a new ‘Portal Report’ in a locally built provider.
In this report choose the option Reports from SQL Query and then add the following query:
WHERE TYPE = ‘PACKAGE BODY’ –(or PROCEDURE OR PACKAGE)
AND NAME = ‘<name of the package>’
ORDER BY line
Change the Maximum Rows Per Page to the amount that you want to see on your screen(let’s say 10000)
When you run this report you can see the code that you where looking for.
If you would like to use this for several procedures/packages you can use some bind variables
WHERE TYPE = :type /*(or PROCEDURE OR PACKAGE)*/
AND NAME = :name
ORDER BY line
A very easy solution and it made my life much easier and I was able to respond much faster to questions of the client.
(Don’t forget to set the security for this portlet only to administrators)