Previous Thread:   Check if connection is open

1/19/2006 12:20:53 PM    Any profiling tools that can attach to SQL Server?
I've tried a couple of tools and there doesn't seem to be any way to attach  
  
to the SQL Server process... I'm assuming there's some way to do this, since  
  
we can debug?  
  
--  
  
Adam Machanic  
  
Pro SQL Server 2005, available now  
  
http://www.apress.com/book/bookDisplay.html?bID=457  
  
--



1/20/2006 11:58:23 AM    Re: Any profiling tools that can attach to SQL Server?
"Adam Machanic" <amachanic@hotmail._removetoemail_.com> wrote in message  
  
news:eOcM$yRHGHA.2012@TK2MSFTNGP14.phx.gbl...  
  
The 'Performance Tools' Profiler in Visual Studio 2005 Team Suite can attach  
  
to SQL Server, however it cannot really be used to Profile SQLCLR code if  
  
that's what you were looking for.  
  
Steven

1/20/2006 3:58:58 PM    Re: Any profiling tools that can attach to SQL Server?
"Steven Hemingray [MSFT]" <stevehem@online.microsoft.com> wrote in message  
  
news:%23bDzfvfHGHA.984@tk2msftngp13.phx.gbl...  
  
Yes, that is one thing I am looking for... But I'm also looking for some  
  
insights into how the hosted environment works.  Can you recommend a tool  
  
for that (or an in-depth article/white paper, if one exists)?  
  
Also, how do I attach?  I get an error when I try to attach to the SQL  
  
Server process ("Invalid .NET Version" or something like that) -- what do I  
  
need to do to make this work?  
  
--  
  
Adam Machanic  
  
Pro SQL Server 2005, available now  
  
http://www.apress.com/book/bookDisplay.html?bID=457  
  
--

1/21/2006 2:04:35 AM    Re: Any profiling tools that can attach to SQL Server?
"Adam Machanic" <amachanic@hotmail._removetoemail_.com> wrote in  
  
news:#7GFXRgHGHA.1760@TK2MSFTNGP10.phx.gbl:  
  
The Steve Pratschner book: Customizing the .NET Framework Common Language  
  
Runtime" is an excellent book about the inner workings.  
  
Niels  
  
--  
  
**************************************************  
  
* Niels Berglund  
  
* http://staff.develop.com/nielsb  
  
* nielsb@no-spam.develop.com  
  
* "A First Look at SQL Server 2005 for Developers"  
  
* http://www.awprofessional.com/title/0321180593  
  
**************************************************

1/24/2006 3:00:57 PM    Re: Any profiling tools that can attach to SQL Server?
"Adam Machanic" <amachanic@hotmail._removetoemail_.com> wrote in  
  
news:#7GFXRgHGHA.1760@TK2MSFTNGP10.phx.gbl:  
  
The book Niels mentioned is a good one.  Steven Pratschner also wrote an  
  
article about hosting the CLR  
  
http://msdn.microsoft.com/msdnmag/issues/01/03/clr/default.aspx and the  
  
sample that he presented at PDC is online here:  
  
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=a3c9a5c5-6478-4e3c-803b-ea5bd7c1a849  
  
Christopher Brumme also has an in-depth blog post about CLR hosting that  
  
focuses on SQL Server here:  
  
http://blogs.msdn.com/cbrumme/archive/2004/02/21/77595.aspx  
  
You can download the PDC presentation DAT418 SQL Server 2005 CLR: Under the  
  
Hood on How We Host the CLR  here:  
  
http://commnet.microsoftpdc.com/content/downloads.aspx  
  
Some of the information in these links might be a little out of date  
  
however, specifically the support for CLR running in fiber mode which was  
  
cut shortly before RTM as described here:  
  
http://blogs.msdn.com/dinoviehland/archive/2005/09/15/469642.aspx  
  
Is the error message you are getting 'Process uses unsupported version of  
  
..NET.'? This happens when you try to attach to sqlservr when the CLR host  
  
has not been loaded into the process yet.  Attaching should work once the  
  
CLR has been initialized.  Let me know your feedback about being able to use  
  
tools like this to profile your SQLCLR user code.