As most of you have figured out by now, I work mostly on queries :). One of the things that I often need to do is to get a statement out of a batch so that I can go look more closely at a query plan (and, in my case, the code that generates it). I use the a query like this to read through a few DMVs and emit the text for the plan I want:select statementstartoffset, statementendoffset, statementtext from ( SELECTSUBSTRING(st.text, (qs.statementstart_offset/2)+1,...
|
1
kudos |
|
||||
No comments yet, be the first one to post comment.