cancel
Showing results for 
Search instead for 
Did you mean: 

Can i log the stacktrace from inside stored procedures?

Former Member
2,575

I have some triggers that call procedures that can "call" triggers. I would like to be able to know inside the procedures what calls have been done to get there. Is it possible to log the callstack?

Accepted Solutions (0)

Answers (2)

Answers (2)

MarkCulp
Participant

If you are using SA 16 then you can use the new STACK_TRACE() function and related sa_stack_trace() procedure to get a stack trace of all of the the calls in the current stack.

Breck_Carter
Participant

For SQL Anywhere 16, see section "9. TRY CATCH And Friends" in Top 10 Cool New Features in SAP Sybase SQL Anywhere 16.

For SQL Anywhere 12 and earlier, see TRACEBACK().