Browsed by
Tag: log

Simple way to save parameters

Simple way to save parameters

Sometimes there is the need to log the startup parameters of a stored procedure. Or maybe be able to send them to a service broker for asynchronous execution. One simple way to do it is using the for xml clause. Of course there is the need for some manual work (or maybe not). The code however would look like this: Now the @params variable is ready to be used / logged / sent forward.

Do we need stack traces? Yes we do.

Do we need stack traces? Yes we do.

In one of my earliest interactions with SQL Server I was working at a company dealing with financial application. I was part of a team with C/C++ background. So before any solid understanding of SQL, our database code was mostly looking like C code, full of operations, procedure invocations, functions. We observed with panic that we could not debug our code, not easily. So came the need of having our faithful stack traces. In time, our knowledge of sql improved,…

Read More Read More