'没有足够的内存用于文件映射'尝试使用 VFP ODBC 驱动程序更新链接服务器时

发布于 2024-11-24 02:15:40 字数 1434 浏览 0 评论 0原文

我在 SQL Server 2008 中有一个链接服务器,它使用 MDASQL 提供程序来访问 Visual Fox Pro ODBC DSN。

我在尝试执行简单查询时收到以下错误:

OLE DB provider "MSDASQL" for linked server "odbclinkedserver" returned message "[Microsoft][ODBC Visual FoxPro Driver]Not enough memory for file map.".

Msg 7399, Level 16, State 1, Line 1 The OLE DB provider "MSDASQL" for linked server "odbclinkedserver" reported an error. The provider ran out of memory.

Msg 7306, Level 16, State 2, Line 1 Cannot open the table "odbctable" from OLE DB provider "MSDASQL" for linked server "odbclinkedserver".

我正在尝试运行此更新查询,这是该活动的目标:

update odbclinkedserver...odbctable
set memofield = m1.blob
from sqlsvrtable m1
where m1.int_1 = odbctable.int_1
and m1.int_2 = odbctable.int_2
and m1.time= odbctable.time
and odbctable.date= '2011-06-28'

我还尝试了一些更简单的查询,但仍然收到相同的错误:

select top 1 * from odbclinkedserver...odbctable

DSN 源是自由表目录。涉及的文件大小为:

  • odbctable.dbf = 62MB
  • odbctable.cdx = 9.85MB
  • odbctable.fpt = 200MB

我已将 SQL 实例配置为以值为 1024 的“-g”参数启动,以便占用 1 GB 内存为此操作预留(这是一个没有其他活动的测试服务器)。

使用的参考:http://msdn.microsoft.com/en-us/library/ ms190737.aspx

考虑到所涉及的文件的大小、查询的简单性以及我已经留出一大块 RAM 供其使用,我已经不知道如何解决这个问题了。

谁能建议一个解决方案来解决这些错误,以便我可以使用上面的更新查询更新目标 dbf?

I have a linked server in SQL Server 2008 that's using the MDASQL provider to access a Visual Fox Pro ODBC DSN.

I'm receiving the below errors when attempting to perform simple queries:

OLE DB provider "MSDASQL" for linked server "odbclinkedserver" returned message "[Microsoft][ODBC Visual FoxPro Driver]Not enough memory for file map.".

Msg 7399, Level 16, State 1, Line 1 The OLE DB provider "MSDASQL" for linked server "odbclinkedserver" reported an error. The provider ran out of memory.

Msg 7306, Level 16, State 2, Line 1 Cannot open the table "odbctable" from OLE DB provider "MSDASQL" for linked server "odbclinkedserver".

I'm trying to run this update query that is the goal of the activity:

update odbclinkedserver...odbctable
set memofield = m1.blob
from sqlsvrtable m1
where m1.int_1 = odbctable.int_1
and m1.int_2 = odbctable.int_2
and m1.time= odbctable.time
and odbctable.date= '2011-06-28'

I have also attempted some simpler queries and still receive the same errors:

select top 1 * from odbclinkedserver...odbctable

The DSN source is a Free Table directory. The sizes of the files involved are:

  • odbctable.dbf = 62MB
  • odbctable.cdx = 9.85MB
  • odbctable.fpt = 200MB

I have configured the SQL instance to start with the '-g' parameter with a value of 1024 so that a gig of memory is set aside for this operation (this is a test server with no other activities).

Reference used: http://msdn.microsoft.com/en-us/library/ms190737.aspx

Given the size of the files involved, the simplicity of the queries, and that I've set aside a gig of RAM for it to use, I am running out of ideas of how to resolve this problem.

Can anyone suggest a solution to resolve these errors so that I can update the target dbf with the update query above?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

撞了怀 2024-12-01 02:15:41

确保您在环境或表结构中没有违反任何 VFP 的 ODBC 限制。特别要注意的是,ODBC 已经有一段时间不被支持了。请查看此处以获取详细的限制列表。您可以使用 OLEDB 驱动程序吗?如果是这样,请在网络上搜索“VFPOLEDB 驱动程序下载”以获得您需要的内容。

Make sure you're not violating any of VFP's ODBC restrictions in either the environment or the table structures. Especially note that ODBC hasn't been suported for some time. Check here for a good list of restrictions. Is using the OLEDB driver a possibility for you? If so do a web search for "VFPOLEDB driver download" to get what you need.

反话 2024-12-01 02:15:40

虽然当我遇到同样的问题时,您似乎预留了足够的内存,但停止和启动 SQL Server 服务,然后运行 ​​sp_dropserversp_addlinkedserver 足以解决问题:

IF  EXISTS (SELECT srv.name FROM sys.servers srv WHERE srv.server_id != 0 AND srv.name = N'DBF_XXX')EXEC master.dbo.sp_dropserver @server=N'DBF_XXX', @droplogins='droplogins'
GO
EXEC master.dbo.sp_addlinkedserver @server = N'DBF_XXX', @srvproduct=N'Microsoft Jet', @provider=N'VFPOLEDB', @datasrc=N'D:\Data To Import\XXX\data', @provstr=N'dBASE 5.0'

--For security reasons the linked server remote logins password is changed with ########
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'DBF_XXX',@useself=N'False',@locallogin=NULL,@rmtuser=N'Admin',@rmtpassword='########'

Whilst you seem to have enough memory set aside when I had the same issue a stop and start of the SQL Server service followed by running sp_dropserver and sp_addlinkedserver was enough to resolve the issue:

IF  EXISTS (SELECT srv.name FROM sys.servers srv WHERE srv.server_id != 0 AND srv.name = N'DBF_XXX')EXEC master.dbo.sp_dropserver @server=N'DBF_XXX', @droplogins='droplogins'
GO
EXEC master.dbo.sp_addlinkedserver @server = N'DBF_XXX', @srvproduct=N'Microsoft Jet', @provider=N'VFPOLEDB', @datasrc=N'D:\Data To Import\XXX\data', @provstr=N'dBASE 5.0'

--For security reasons the linked server remote logins password is changed with ########
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'DBF_XXX',@useself=N'False',@locallogin=NULL,@rmtuser=N'Admin',@rmtpassword='########'
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文