Home  >  Article  >  Database  >  There is insufficient system memory to run this query 错误

There is insufficient system memory to run this query 错误

WBOY
WBOYOriginal
2016-06-07 17:43:051035browse

服务器环境大致情况如下 : 操作系统: Microsoft Windows Server 2003 R2 Enterprise Edition Service Pack 2 数据库 : Microsoft SQL Server 2005 - 9.00.5000.00 (Intel X86) 。 机器物理内存8G,开启了使用AWE分配内存选项(U)" 在这台服务器上,创建You

服务器环境大致情况如下

操作系统:   Microsoft Windows Server 2003 R2 Enterprise Edition Service Pack 2

数据库  :   Microsoft SQL Server 2005 - 9.00.5000.00 (Intel X86) 。

机器物理内存8G,开启了“使用AWE分配内存选项(U)"

clipboard

在这台服务器上,创建YourSQLDba后,配置过程中创建函数的时候,报如下错误,重试了几次都是如此,但是其它应用从来没有出过这个错误,而且这是一台生产服务器,很多应用在跑,所以这才是让我纳闷的地方:

消息 701,级别 17,香港虚拟主机,香港服务器,状态 13,过程 clr_GetFolderList,第 1 行

There is insufficient system memory to run this query.

消息 701,级别 17,状态 13,过程 clr_GetFolderListDetailed,第 1 行

There is insufficient system memory to run this query.

clipboard[4]

其实这两个函数也没特别之处,而且在其它64数据库上,也没有碰到过类似的错误。

CREATE FUNCTION yUtl.clr_GetFolderList (@FolderPath nvarchar(4000), @SearchPattern nvarchar(4000))

RETURNS TABLE ([FileName] nvarchar(255))

AS EXTERNAL NAME [YourSqlDba_ClrFileOp].[Clr_FileOperations.FileOpCs].[Clr_GetFolderList];

GO

CREATE FUNCTION yUtl.clr_GetFolderListDetailed (@FolderPath nvarchar(4000), @SearchPattern nvarchar(4000))

RETURNS TABLE ([FileName] nvarchar(255), [FileExtension] nvarchar(255), [Size] bigint, [ModifiedDate] datetime, [CreatedDate] datetime)

AS EXTERNAL NAME [YourSqlDba_ClrFileOp].[Clr_FileOperations.FileOpCs].[Clr_GetFolderListDetailed];

GO

网上搜索了一下,发现蛮多人也遇到个这个错误:,但是也没有一个定论。

于是也按那些人讨论的,检查服务器环境:物理内存,数据库版本,免备案空间,AWE是否开启,最大服务器内存,clr enabled 配置等等

sp_configure 'clr enabled'

name                                minimum     maximum     config_value run_value

----------------------------------- ----------- ----------- ------------ -----------

clr enabled                         0           1           1            1

但是,折腾了很长时间,也没搞清真正的出错原因,没办法,只能祭出大杀器”重启SQL SERVER服务",然后重新创建YourSQLDba数据库,创建相关存储过程、函数等。暂时记录一下这个问题,等有空闲或下次遇到时候,再想想办法解决它。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn