Search code examples
sql-serverfilestream

Sql Server FILESTREAM Total File Size


Is there a query that would get me the total file size of the files that are in the FILESTREAM folder on the disk?


Solution

  • The following query will return the length in bytes of the filestreamcolumn column:

    SELECT SUM(DATALENGTH(filestreamcolumn)) FROM filestreamtable;
    

    Source