SQL. Debugging stored procedures and identifying the causes of errors

Use the stored procedure exec print (str) to output the variables of interest - it writes to the as_trace table with the print code. In the admin area, you can view the latest output results of this procedure.

You can run the procedure directly from the SQL editing window. 

Fill in the parameters (you can just copy them from the procedure) in the format " @name=value,"

For complex types, the format is: @[parameterName]___[SQLType]=[key]||[value]___[key]||[value]  

  • Where SQLType is CRUDFilterParameter, DictionaryParameter, ExtendedDictionaryParameter. 
  • Separators are triple underscores (between the parameter name and the type). 
  • Complex type parameters are also separated by a triple underscore (___) and inside 2 vertical lines (||).


During the test call, the transaction is Rollback. in Other words, all changes in the database will be canceled, but you will get all the data that the procedure outputs. 

How do I get parameter values that are passed to stored procedures? 

To do this, specify the debug=[storage name] parameter in the URL.

As a result, the parameter values will end up in the trace print table (the name and all parameters with values are output). 

Example address: https://falcon.web-automation.ru/pages?debug=crud_pages_getitems

Note: this mode works only if the core values are passed through DynamicParameters (in most cases, It is used). 

Also use SQL Profiler Expressto view which parameters are passed to stored procedures. To do this, you must grant the user rights to trace (run on the server):

use master

to cancel the trace right, use on the server:

use master
Revoke ALTER TRACE TO fxproject2;

More detailed documentation for SQL Profiler Express - https://drive.google.com/file/d/0B8N7eBTTS7MbYmplT1NZbGk0T0U/view?usp=sharing

If an error occurs or it is unclear why the query is not working correctly, see the query in SQL Profiler Express, copy it to SQL Management Studio (directly with the same parameters), and debug a clean call in SQL Management Studio.

Falcon Space is a functional web development platform on a narrow stack MS SQL/Bootstrap. Falcon Space Gettting started

Falcon Space Platform

This is a reduction in the cost of ownership

at the expense of fewer people to support

This is a quick change

while using the program

This is a modern interface

full adaptation for mobile devices