在sqlserver中将PDF文件存储为二进制文件 [英] Storing PDF files as binary in sqlserver

查看:200
本文介绍了在sqlserver中将PDF文件存储为二进制文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Now I am considering options to store the documents on the server
I'll have PDF documents mostly around 1 Million or so,those will store into a SQL Server table
I am aware that I will reach the 8TB, I'm not sure about limit .mdf size of SQL Server Enterprise edition.
After the PDF files are stored they can be downloaded and viewed via browser after entering the related order number.
Here is some additional information:
-The PDF files will have a size of around 1-2 MB. each
-SQLServer 2016 Enterprise
-2TB SSD*4





我尝试过:





What I have tried:

my table of orders by a varbinary(MAX) column and store the PDF document directly into that binary field.

推荐答案

不要将它们存储在SQL服务器中 - 将它们存储为文件(我使用GUID作为文件名)并存储位置加上SQL中的原始文件名。

这样,你就不会使用不必要的数据堵塞SQL,浪费大量的SQL服务器带宽,并且可以更容易地备份整个系统。 br />


只要从数据库中获取它们的所有应用程序都可以访问该文件夹,它就会变得更加简单。
Don't store them in SQL server - store them as files (I'd use a GUID as the file name) and store the location plus the original filename in SQL.
That way, you aren't clogging SQL with unnecessary data, using up huge amounts of SQL server bandwidth, and you make it easier to back up the whole system.

As long as all the apps that would fetch them from the DB have access to the folder, it's all a lot simpler.


这篇关于在sqlserver中将PDF文件存储为二进制文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆