Debugging PL/SQL Code
I have very interesting situation. I have been assigned to migrate an complete database driven application to Java/Spring and Tomcat Server, now my challenge here is that current application does not have any java, there are only procedures and packages and functions and everything is PLSQL
, even front end is in packages, htp.p
tag has all HTML
front end code.
Other challenging part is that application is legacy application and many developers have worked on it and the last one has just left.
I want to know w开发者_JS百科hat approach and guidance you would give to someone who has similar situation as mine and also what are the ways to debug the PLSQL
application, would really if you can some useful pointers about debugging PLSQL
along with some reference to books or web sites.
Thanks.
The best thing to do would be use the database designs (assuming they're OK), and the HTML output of the current version for your view designs, and redo the application in whatever Java framework you're happy with. The PL/SQL version of the application would be a very poor fit if you just tried to re-implement it in Java.
The htp and htf packages are the PL/SQL Web Toolkit. There's pretty much a one-to-one mapping from these procedures to HTML tags so they're very low level and not hard to understand. It's basically the equivalent of servlets for PL/SQL, only less powerful.
Debugging web toolkit code is very awkward because you have to remotely attach to the database session that the Apache modplsql module is using. Oracle's JDeveloper used to support this but current versions don't seem to work properly, at least not with Oracle 11g in my recent attempt. It's a lot easier to use old-fasioned print or logging methods of debugging, for example using LOG4PL/SQL. But really you don't want to get into the code that deeply since you should be throwing all of it away anyway.
Try this tutorial: Developing and Debugging PL/SQL using Oracle SQL Developer (2.1)
精彩评论