I'm looking to add tracing statements to stored procs. The stored proc will call a special tracing stored proc that handles all aspects of tracing.

Our Sybase database resides on a Unix box, and our server-side components (which call the database) run in a COM+ application in a Windows 2000 Server. Currently we have tracing enabled in W2K server with all trace statements logged by DebugView (third-party util from SysInternals). Ideally, I want to see trace statements from the stored proc appear in DebugView with the rest of traces from the COM+ (this gives continuity and sequence). DebugView will only display trace statements sent using the Win32 API OutputDebugString.

I understand that an Extended Stored Procedure is a DLL written in C (hence it can call Win32 API) that must run inside an XP Server process. Can we have XP Server process run on a Windows 2000 Server, given that our database resides on a Unix box?

Any other strategies for trace statements in stored procs.