Menu Close

Locate large attachments With one script

For more tips and how-to's, visit our tech blog

This post is 4 years old. Keep in mind IT is a business of moving targets, and this information may be outdated. Contact Us for more info.

Documents over 50MB are just not cool. They will also prevent a conversion to Best Practice.

Here is an SQL query to find any documents over 50MB.

I am using an incorrect multiplier of 1000 because this will catch that and the correct multiplier of 1024 as well.

select MAFile.fname, MD.itemid,MD.PatientId,MD.PatientName,md.DocTitle,md.DocDate
from MD,MAFile
where MAFile.fsize > 50000000 and MD.itemid=MAFile.itemid