SQL SERVER – Get List of the Logical and Physical Name of the Files in the Entire Database

One of the most popular questions I often receive is why do I like to do consultation – my answer is very simple – it gives me an opportunity to learn continuously learn new things from my clients. Here is a script which I have built during my recent Comprehensive Database Performance Health Check. To perform one of the performance tuning tasks we needed a list of all the logical and physical names for the files for every single database on the SQL Server Instance. Here is the script which can list all the physical and logical name of the files along with their type as well.

Read More