• Duran (8/18/2015)


    I'd love a bit of guidence in getting this cleared up. I'm not sure what way to turn as this point, and the box is critical. Obviously I am more than happy to provide more information.

    How good are you at profiling .NET memory usage and reading/changing .NET code? Or even better, what do they need to use SQLCLR in the database for exactly? A lot of cases of app domain unloads can simply be memory leak detection in the .NET hosted API's and SQLOS is unloading the AppDomain as a part of those policies. It's not difficult to trigger that with just a basic DataSet object that you populate with some data. Or use String.Split with a big string as explained by Adam Machanic here http://sqlblog.com/blogs/adam_machanic/archive/2009/04/26/faster-more-scalable-sqlclr-string-splitting.aspx

    The simple answer is that you might not be able to figure it out from a SQL Server standpoint, you would have to be reviewing the .NET code and using a performance profiler as well to see what's going on there too.

    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]