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?

asked 28 May '13, 09:10

Audun's gravatar image

Audun
1567815
accept rate: 0%


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.

permanent link

answered 28 May '13, 10:51

Mark%20Culp's gravatar image

Mark Culp
23.3k9132275
accept rate: 40%

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().

permanent link

answered 28 May '13, 14:20

Breck%20Carter's gravatar image

Breck Carter
26.9k438609883
accept rate: 21%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×36

question asked: 28 May '13, 09:10

question was seen: 908 times

last updated: 28 May '13, 14:20