Phil Factor (2/5/2009)
use of CLR makes it harder for a SQL Server administrator to see what's going on with their SQL Server.
Yes, Agreed! However, I've recently started using NET Reflector with an add-in that allows you to see the source of all the CLR routines currently in the database.
http://www.denisbauer.com/NETTools/SQL2005Browser.aspx
It is a joy to use and it means that the D**ned developers can't hide their code from you, particularly as you can decompile it into VB or C#. and save the source to a file. Power to the DBA!
Depending on how you deploy your Assembly you don't really even need Reflector. For brevities sake I didn't include all the files in the script I provided here, but if you do, then you can get the code from the sys.assembly_files DMV:
declare @content varchar(max)
select @content= cast(content as varchar(max))
from sys.assembly_files
where name = 'os_directory_info.cs'
print @content
Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
My Blog | Twitter | MVP Profile
Training | Consulting | Become a SQLskills Insider
Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]