MemToLeave related to OLEDB error?

  • We have a production server that intermittently gets the following application popup error on the console when executing a Linked Server query (using SQLOLEDB).  The error is:

    Application popup: SQL Server OLEDB provider support error : Unable to load SQL Server OLEDB provider resource DLL. The application cannot continue.

    So, we've reinstalled MDAC, that didn't help.  I've done some research and suspect that this may be caused by a lack of memory in MemToLeave (which is SQL's memory allocation for XP stored procs, OLEDB Providers, and a few other things.  Does anyone know how I can check how much memory is being used in SQL Server's MemToLeave allocation?  Has anyone experienced similar errors?  I know SQL allocates 256mb for MemToLeave by default. I understand that there is a -g startup parameter that you can use to modify this, however I don't want to do that if it's not going to eliminate the OLEDB issue.  Any thoughts would be greatly appreciated.



    A.J.
    DBA with an attitude

  • This was removed by the editor as SPAM

  • Check file permissions on C:\Program Files\Common Files\System\Ole DB\sqloedb.* (.dll & .rll). "Everyone" needs read and execute on these files.

  • First, MTL space by default is 384MB.

    512KB * [max number of threads] + 256MB.

    Aside from using the -g switch, you can also raise this amount by raising the max number of threads up to a theoretical 1GB limit.

    OLE DB connections use the MTL space, a couple things you can do to reduce memory usage is not use linked server selects, as they always pull the full dataset back from the linked server (same as doing a select *). Try placing a stored proc or view on that server that returns only the information you need, then splice the results with your local data. That should reduce the amount of MTL space required for the query.


    Enjoy!

    A Brown

    Manage all of your backups in one simple job using this script.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply