sql - 编译 SQLCLR 函数期间出现 NullReferenceException
问题描述
我在 sql 2016 实例上的 5 个不同数据库上运行下面的 sql server 函数:
select * FROM fn_myfunction('', 0, 0,'30 Apr 2015','1', 0)
并收到此错误消息:
Msg 10313, Level 16, State 51, Line 1
An error occurred while using the .NET Framework during IL compilation. The server may be running out of resources. Try running the query again. If the problem persist, contact a support professional.
System.NullReferenceException: Object reference not set to an instance of an object.
System.NullReferenceException:
我已经对这些数据库进行了备份并恢复到不同的 sql 2016 实例,错误消失了。所以我现在认为这与我的数据库或sql代码无关。这可能是环境问题?
请问有什么建议吗?
解决方案
我已经重新启动了我的实例并且这有效。这里的问题与@Panagiotis 建议的数据库或代码无关,因为我在不同的实例上使用了相同的数据库并且无法重现错误。这取决于充分利用内存。所以我改变了我的内存设置并重新启动了实例并像锤子一样工作!!!!!!!!!!!!!!!
推荐阅读
- php - Wordpress 永久链接重写自定义分类法和帖子类型,在 URL 中使用父项和子项层次结构
- android - 如何从 Android Auto Backup 中排除 base.apk?
- windows - 使用 Cmake 构建 Geos
- javascript - 测试登录组件失败并出现错误:预期为真为假
- sql - 使用递增的时间戳执行插入
- c# - 正则表达式根据其中的值获取特定匹配括号后的所有内容
- php - 如何从 PHP 文件中查找和导入默认 CSS 标签
- chatbot - 一种响应的 AIML 多种模式
- python - 如何在python中找到numpy数组的枚举索引?
- angular - 通过 ionic 和 Angular 从现有 SQLite 数据库中读取数据