1.为了防止服务器因为sqlserver内存溢出造成卡顿或死机的情况,需设置数据库的内存限制大小,20G
2.程序找导出数据流的时候报错,这个时候就要对sqlserver做对应的处理了:
c#:System.OutOfMemoryException: 内存不足。
3.对sqlserver的内存资源进行释放
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
--use master --go --强制释放内存 alter procedure [dbo].ClearMemory as begin --清除所有缓存 DBCC DROPCLEANBUFFERS --打开高级配置 exec sp_configure '