如何解决“System.OutOfMemoryException”在SQL Server? [英] How to solve "System.OutOfMemoryException" in sql server ?
问题描述
嗨
我将所有文件(doc,image,pdf等)保存为sql server,使用filestream作为二进制格式,我的意思是文件二进制存储表得到了文件流。当我尝试选择所有行表单时,它显示System.OutOfMemoryException,如何解决这个问题,如何增加sql server中的内存空间。
注意:我要生成png和js文件格式的pdf文件使用第三方查看器在Web应用程序中查看。第三方查看器需要png和js文件,所以首先是另一个pdf文件我将其他文件转换为pdf然后形成转换pdf文件我将生成png和js文件并存储到另一栏。
问候
Aravind
Hi
I am save all files(doc,image,pdf etc) into sql server as binary format using filestream,i mean file binary store table got filestream .When i try to select all row form table it show "System.OutOfMemoryException" ,how to solve this,how to increase memory space in sql server.
Note:i am going to generate png and js file form pdf file to view in web application using third party viewer.That third party viewer need png and js file,so at first other that pdf file i will convert other file to pdf and then form convert pdf file i will generate png and js file and store into another column.
Regards
Aravind
推荐答案
而不是增加sql server RAM,你最好更改应用程序设计。例如,如果您有数千个文件,但用户一次只能查看一个文件,那么您需要加载所有文件吗?
如果您需要显示文件列表,请仅选择其他列如下所示
rather than increasing sql server RAM you better change the application design. for example if you have thousands of files but user will view only one file at one time, so you you need to load all of them?
if you need to display list of files, select only other columns like below
select fileid, filename from yourtable
仅加载选定的文件
load only selected file
select fileData from yourtable where fileid =@fileid
使用where where condition you可以限制仅匹配文件的结果
by using where condition you can limit the results for matching files only
这篇关于如何解决“System.OutOfMemoryException”在SQL Server?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!