![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, Is there a simple way to debug DB2 SQL procedures, such as: which branch of a conditional construct was chosen, what value did a counter reach, etc, _without_ installing some big, complicated IDE? My question could maybe be rephrased as "is there a way to perform printf- style debugging in DB2 SQL procedures?" If not: I'm considering creating a C-based UDF which logs arbitrary strings to syslog, so that a SQL procedure can inform the surroundings of its state during development. -- Troels |
#3
| |||
| |||
|
|
I don't know if Serge's SQL PL/PL/SQL profiler would be of use [...] |
|
What else comes to my mind is a debug table and a debug function, something like insert into dbg values (current timestamp, message). |
|
PL/SQL should have a debug function built in if you're on V9.7. |
#4
| |||
| |||
|
|
PL/SQL should have a debug function built in if you're on V9.7. That's interesting. I suppose this relates to DBMS_OUTPUT which seems to be exactly what I was looking for. Thanks. |
#5
| |||
| |||
|
|
Hello, I wrote: PL/SQL should have a debug function built in if you're on V9.7. That's interesting. I suppose this relates to DBMS_OUTPUT which seems to be exactly what I was looking for. Thanks. Hmm. DBMS_OUTPUT requires that Oracle compatibility be enabled :-( Is Oracle compatibility enabled in all DB2 LUW 9.7 editions, or does it require a special licence? |
#6
| |||
| |||
|
|
Hello, Is there a simple way to debug DB2 SQL procedures, such as: which branch of a conditional construct was chosen, what value did a counter reach, etc, _without_ installing some big, complicated IDE? |
#7
| |||
| |||
|
|
On Sep 6, 12:42 pm, Troels Arvin<tro... (AT) arvin (DOT) dk> wrote: Hello, I wrote: PL/SQL should have a debug function built in if you're on V9.7. That's interesting. I suppose this relates to DBMS_OUTPUT which seems to be exactly what I was looking for. Thanks. Hmm. DBMS_OUTPUT requires that Oracle compatibility be enabled :-( Is Oracle compatibility enabled in all DB2 LUW 9.7 editions, or does it require a special licence? It depends on which specific compatibility feature you want to use. DB2 Enterprise Edition is the only version that supports the full spectrum. Regarding DBMS_OUTPUT (and other system-defined modules), this is supported in Workgroup Edition but not in Personal Edition or Express(- C) Edition, see: http://publib.boulder.ibm.com/infoce.../c0053670.html You may also want to checkout this forum-post on DeveloperWorks: http://www.ibm.com/developerworks/fo...85419&tstart=0 Troels, |
![]() |
| Thread Tools | |
| Display Modes | |
| |