 |
Oracle Spy.
Ooh, the wonders of Dbms_Pipe. This program lets you recieve messages sent to Oracle pipes
by your PL/SQL code (SQL*Forms, stored procedures/packages, database triggers, etc) from
a Windows 3.1x front-end. The big advantage for debugging purposes is that it's asynchronous,
the messages appear (more or less) as they are generated, unlike Dbms_Output which waits
until the whole program finishes before displaying anything.
Unless you're really attached to your Win3.1x front-end I'd strongly suggest ditching this
in favour of the newer (and slightly less flaky) Win32 version.
It would be helpful if you didn't have to get your developers (or yourself for that matter) to
bugger about with Dbms_Pipe calls themselves. See the '.pls' file that comes with the 32-bit
version for a much better version, but I'd suggest creating something like this. Then, when the
database performance goes down the pan ('cos the pipes keep getting locked) you can just
replace this with a stub that doesn't do anything.
|   |
  |
 |
|   |
CREATE OR REPLACE PROCEDURE send_my_message(
   p_message IN VARCHAR2,
   p_pipename IN VARCHAR2 DEFAULT 'MY_PIPE'
) AS
   rc NUMBER;
BEGIN
   Dbms_Pipe.Pack_Message(p_message);
   rc := Dbms_Pipe.Send_Message(p_pipename,0);
EXCEPTION
   WHEN OTHERS THEN NULL;
END send_my_message;
|
  |
|   |
  |
  |
If you try to run the executable as-is it'll probably fall over with loads of errors about
missing DLLs. This means either that your Oracle installation's jiggered (or an incompatible
version) or that you'll just have to copy the DLLs off your Oracle installation media yourself.
The files you need are (I think this is a complete list); nls23win.dll, core3win.dll, usdmem.dll,
ora71win.dll, and all the gubbins associated with SQL*Net. I found these files on the Oracle®
Products CD (Part #: C12044-01).
Lots of the stuff here is Copyright © Oracle Corporation. Please don't sue me. Most of
the actual code's mine. Honest 'guv.
|
  |