Quote:
|
Originally Posted by tej_athavale
I want to know what is a stacktrace? How to check if it is generated OR a query may probably generate a stacktrace ? 
|
A stacktrace is nothing but what internal functions any process goes through. This includes kernel level processes too.
When you see a stacktrace in the ASE error log, it means that the ASE could not handle a particular scenario. It usually gives what kind of error it is and the last set of function calls it went thro (i.e. stacktrace) before it couldnt handle the situation anymore.
When you are reading the stacktrace, its actually upside down. i.e. The last function it has called is in the first line and in that order. i.e. last called, first displayed.
If you have a mysybase account, you can type in the function calls and see if theres an existing match with your case.
some of the function names are easily readable. For eg., vw_% means something related to views. But some are not.
Its a very interesting topic.
And what pdreyer gave is very useful. dbcc stacktrace can tell you exactly what functions a spid is calling internally and give you an idea. On a hung scenario or a sleep scenario, it will turn out very useful.