How to use FILESTREAM, query the metadata, and access filestream data using TIFF files


The main goal of this blog post is to showcase how you can discover the FILESTREAM assets in your SQL Server by querying the metadata. Some of those metadata queries may not be obvious so sharing this to make it easier

 

1. Create database with a FILESTREAM filegroup 

 

 

 

 

USE [master] GO –create database with Filestream CREATE DATABASE [FileStreamTest] CONTAINMENT = NONE ON PRIMARY ( NAME = N’FileStreamTest’, FILENAME = N’C:Program FilesMicrosoft SQL ServerMSSQL15.MSSQLSERVERMSSQLDATAFileStreamTest.mdf’ , SIZE = 204800KB , MAXSIZE = UNLIMITED, FILEGROWTH = 65536KB ), FILEGROUP [FileStreamFG] CONTAINS FILESTREAM DEFAULT ( NAME = N’FileStreamTestFStream’, FILENAME =