Question

I have a DBF file on a network share that I'm trying to select into a SQL Server table.

This query:

SELECT * FROM OPENQUERY(MyLinkedServer, 'SELECT * FROM DP')

... throws this error:

OLE DB provider "MSDASQL" for linked server "MyLinkedServer" returned message "[Microsoft][ODBC Visual FoxPro Driver]Not enough memory for file map.".
Msg 7399, Level 16, State 1, Line 11 The OLE DB provider "MSDASQL" for linked server "MyLinkedServer" reported an error. The provider ran out of memory.
Msg 7320, Level 16, State 2, Line 11 Cannot execute the query "SELECT * FROM DP" against OLE DB provider "MSDASQL" for linked server "MyLinkedServer".

I've read about using SYS(3050) to release FoxPro's memory. I can't figure out how to execute that against the linked server though.

Was it helpful?

Solution

Linked server queries use memory from an area outside of the SQL Server buffer pool called memToLeave, which is used for servicing connection threads and now the sql clr amongs other things. On 32-bit it's 384 MB in size which can be inadequate for some scenarios.

If you need to adjust your SQL Server Memory configuration and in particular the memToLeave area you will find an explanation on the following blog:

SQL Server Memory Configuration, Determining memToLeave Settings

OTHER TIPS

If you're running SQL Server 2005 or even 2008 SP1 or earlier there's a hotfix for a memory leak issue: http://support.microsoft.com/kb/974130

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top