SQL 2008 Replication Error - Failed to initialize the Common Language Runtime

Abhishek Kulkarni 1 Reputation point
2022-05-24T12:13:11.68+00:00

Hi,

We have quite a few Tables included in our Replication setup from SQL2008 to SQL2014. All running Good. While for maintenance a few were dropped and were to be recreated as new Publications. We do this all the time. This is an Axapta Application.

The issue we see is now while creating these few new Publications we get below error- I have tried to enable CLR, increased the allocated memory to SQL instance - but no luck.

Message: Failed to initialize the Common Language Runtime (CLR) v2.0.50727 due to memory pressure. This is probably due to memory pressure in the MemToLeave region of memory. For more information, see the CLR integration documentation in SQL Server Books Online.

Failed to initialize the Common Language Runtime (CLR) v2.0.50727 due to memory pressure. This is probably due to memory pressure in the MemToLeave region of memory. For more information, see the CLR integration documentation in SQL Server Books Online. 

Would really appreciate if any one can help to resolve this and setup the replication.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,784 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Bjoern Peters 8,781 Reputation points
    2022-05-24T17:12:18.893+00:00

    It is hard to say what might help you...

    if I google for that error, I'll find many "easy" solutions or troubleshooting guides for that error, and we don't know which of them you already tried...

    So as the error message states... it has something to do with (not enough) memory... so you have to (somehow) get more available memory for that CLR.

    Please explain what you mean by "..., increased the allocated memory to SQL instance..."

    Does it mean adding more memory to that server, configuring min/max memory of that SQL instance, or changing os memory configuration (vas?)

    And maybe you'll find a hint in the eventvwr for more details...
    Or you can get hints from your last activities on that server... what has changed between your last recreation and now?
    Did someone install a new patch, or changed something in the configuration, added a new .NET version... something like that.

    Please, give us more information on your system.


  2. CathyJi-MSFT 21,096 Reputation points Microsoft Vendor
    2022-05-25T03:28:17.25+00:00

    Hi @Abhishek Kulkarni ,

    This is generally caused if using 32bit SQL Server. SQL server 32 bit instance's virtual memory is limited to only 4GB. You can check the bit by running 'select @@version'.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".