SQL Anywhere

I'm interested in recording the execution of procedures and functions while debugging. If possible I would also like to record the parameter values sent to the procedure or function. Is there an automated method for doing this?

Thanks Jim

asked 09 May, 12:19

J%20Diaz's gravatar image

J Diaz
accept rate: 10%

Not in the debugger but perhaps the request logging level procedures+hostvars could be used for this? See RequestLogging/RequestLogFile set using sa_server_option (or via the -zr/-zo command line settings). The request log can be analyzed using sa_get_request_times which creates the temporary tables SATMP_request_time and SATMP_request_hostvar.

(10 May, 10:04) Chris Keating

I'm interested in recording the execution of procedures and functions while debugging.

What exactly do you want to get recorded (besides the parameter values, as stated in the second question)?

FWIW, you can use MESSAGE statements with the DEBUG ONLY clause and then decide via the debug_messages option whether those MESSAGE statements are executed or not. (Note, it apparently is independent of running the SQL Debugger or not.) And you might use the buitin sa_strack_trace() or STACK_TRACE() to get information about caller hierarchies and/or parameter values. – Obviously, this requires modifications to procedures and functions beforehand.

(10 May, 11:14) Volker Barth
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

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



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:


question asked: 09 May, 12:19

question was seen: 437 times

last updated: 15 May, 01:38