Sunday, July 15, 2007

Debugging in SQL*Plus

The original content has been revised.

There was a usual yet another "holy war" discussion about GUI vs. command line...

I work with SQL*Plus. It is not because I don't like graphical tools but just because I don't like to trust developers who made those tools. :-) One of course can ask me do I like to trust developers who make sqlplus. Yes, I do :-) I know them personally. Another point here the sqlplus is too simple to have complex issues which one cannot solve quickly.

And what I also don't like is to see people who start using the graphical tools without reading any documentation [in this Oracle Documentation]. Those tools hide the guts, make stuff looking nicer and easier... It's probably Ok but that is not my style. :-) First thing I do — I read. Reading is fundamental.

I started long time back and I live in the command line — I work with and develop using vi[m] and sqlplus on Linux/Unix. Not that I completely don't use the GUI, of course I do, for instance JDeveloper, OEM are used from time to time for some specific needs. But nothing would happen if those tools aren't around.

Anyway, a person called itself "Zhaba - Toad" asked for a viewlet that illustrates how to debug in SQL*Plus. The viewlet was provided. There is nothing tricky there. The functionality is based on the dbms_debug package that had been created long time back and I've been using it for quite a while, starting from the times when it was undocumented. One just have to read the documentation and get familiar with what is available... It seems that most of the people participated in the discussion weren't aware of the availability of dbms_debug package.

Then I had been asked to share the scripts. Unfortunately the scripts I had were not ready to be shown as is. So I decided to spend some time and make them cleaner and nicer. Those are available here [if the scripts aren't there try again later]. I also made a new viewlet. 10.2.0.3.0 is used in all examples.

To conclude, one can easily debug in SQL*Plus if it's really needed. :-)

2 comments:

Yury said...

Спасибо! Впечатляет

Vladimir Begun said...

Не за что, заходите ещё.