如何配置SQL CLR应用程序?

时间:2023-02-11 01:44:44

I have a SQL CLR function in SQL Server 2005. I want to profile this function to make sure there are no memory leaks. Any recommendations on how to determine if my function is behaving properly?

我在SQL Server 2005中有一个SQL CLR函数。我想分析这个函数,以确保没有内存泄漏。有关如何确定我的功能是否正常运行的任何建议?

1 个解决方案

#1


1  

Memory leaks are atypical for CLR applications, so that should be of little concern. But if I were to profile a SQL CLR function, I think I would create a stand-alone test application that calls the same DLL/methods outside of SQL Server and profile that. It seems to me that SQL's own resource use would swamp most performance affects of your own methods when run in that environment. But I have never tried such a thing myself.

内存泄漏对于CLR应用程序来说是不典型的,所以这应该没什么问题。但是,如果我要分析SQL CLR函数,我想我会创建一个独立的测试应用程序,它调用SQL Server之外的相同DLL /方法并对其进行配置。在我看来,当在该环境中运行时,SQL自己的资源使用会淹没您自己的方法的大多数性能影响。但我自己从未尝试过这样的事情。

#1


1  

Memory leaks are atypical for CLR applications, so that should be of little concern. But if I were to profile a SQL CLR function, I think I would create a stand-alone test application that calls the same DLL/methods outside of SQL Server and profile that. It seems to me that SQL's own resource use would swamp most performance affects of your own methods when run in that environment. But I have never tried such a thing myself.

内存泄漏对于CLR应用程序来说是不典型的,所以这应该没什么问题。但是,如果我要分析SQL CLR函数,我想我会创建一个独立的测试应用程序,它调用SQL Server之外的相同DLL /方法并对其进行配置。在我看来,当在该环境中运行时,SQL自己的资源使用会淹没您自己的方法的大多数性能影响。但我自己从未尝试过这样的事情。