But its useful to have a few TSQL queries in the stable, too, for adhoc use or if a given memory state needs to result in some action taken within SQL Server.
i'm sure there's a clever wayt to use 'pivot', 'unpivot' and/or 'cross apply' to make this query more elegant. But i just wanted to get this here somewhere. if i figure out a more elegant way to get the resultset i'll update this blog post.
These results - in the order of their capture - are much more interesting.
Let's look at the results below a bit.
The target for the instance is 4 * 180, 991, 992 kb = 723, 967, 968 kb = 707, 000 mb.
Total for the instance is 883, 498, 216 = 862, 791 mb. 155, 791 mb is a pretty big overage.
Total foreign memory is 207, 386, 832 kb = 202, 506 mb. That's a lot of foreign memory.