on 2013 Feb 22 6:52 AM
In a stored procedure I'd like to get the call hierarchy like it's shown in the tab "Call Stack" when debugging with Sybase Central.
I remember having seen a system procedure or function for that, but I can't seem to find it. Can annyone point me to that procedure (or tell me my memory is wrong)?
Request clarification before answering.
Are you looking for the following system function?
select traceback();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Volker's answer helped me find the function I've seen before. But to my disappointment it's only result is the SQL command that was executed when an error occured.
What I had in mind, was getting informations about where the error occured (procedure or trigger). But I suppose that there exists not such function, or am I wrong?
One workaround I have thought of (but don't know whether it would work at all, and it would require work...):
As stated, I don't know whether this will work, and of course the "re-signal" would possibly interfere with the attempt to handle errors locally...
Volker, thank you for the suggestion. The hard part is the "relevant procedure" as that is exactly what I'm wanting to find out. The database for that application has ~600 SP and ~400 triggers created over the last 15 years, many of them lacking proper error handling.
So my next step will be to try the-soon-to-be-released-version of SA (kind of "He-Who-Must-Not-Be-Named" ;-)).
User | Count |
---|---|
47 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.