SQL Flow Field Guide

FILEPROPERTY

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

catalog lookup

What changes

Input
catalog metadata (object, column, index, file, database properties)
Output or change
id, name or property value
Return type
int

Syntax at a glance

FILEPROPERTY ( file_name , property )

Work example

Read a documented property of a database file for storage diagnostics.

Use schema-qualified names and test missing and permission-hidden objects separately.

Check your work Check file name and property in the owning database rather than assuming a server-wide file.

Open Microsoft Learn for full syntax, permissions, and details for your version.