Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Every midnight not a specific time, the sql server will unload the CLR assembly. The reason is that due to memory pressure, the assembly is marked with unload and will be unloaded soon.

How to make the assembly never unloaded, since reload will impact the query performance a lot. Second question is how to find the root cause of sql server reported high memory pressure at midnight?

I was using the performance monitor to track the memory usage of each OS processes, and didn't see the huge memory usage increase at that time.

The system is Windows Server 2008 R2 and SQL server 2008 R2.

The system is x64. Sql server is x64 standard.

The log is "AppDomain 9 ( is marjed for unload due to memory presure.)"

I don't think there is a schedule job at that time.

The reason of why the memory pressure is high at that time is unknown.

share|improve this question

migrated from stackoverflow.com Jan 3 '13 at 22:26

This question came from our site for professional and enthusiast programmers.

1  
Any scheduled jobs at midnight? –  Martin Smith Jan 3 '13 at 23:04
    
Can you post the exact message you see / error messages? Can you disclose more information about server configuration? How much RAM, CPU, 32-bit or 64-bit system & what version of windows? –  John DaCosta Jan 5 '13 at 6:39

1 Answer 1

SQL server 32 bit instance's virtual memory is limited to 4GB. If you use SQL CLR extensively with a SQL Server 32 bit instance and experience one or more of above errors, Microsoft recommends that you migrate to a 64 bit SQL Server. This will enable SQL CLR to access more virtual memory and may prevent the above errors from happening in your environment.

For futher information check out the following page: http://support.microsoft.com/kb/969962

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.