SQL Server Get free space in all files in an Instance:

As DBAs we are always challenged of unexpected size growth of log or data files and need to shrink files based on available free space in each file. Most of the times we are stuck and do a lot of scripting to find the free space available in each data or log files for an SQL Database. Here is a simple query which will return free space available in all data and log files of all the databases in an instance of your SQL Server. By providing the parameters facilitated in the script you can get free space in a particular database or on a particular drive.


Happy Troubleshooting.



Manohar Punna

Like us on FaceBook Follow us on Twitter | Join the fastest growing SQL Server group on FaceBook

Follow me on TwitterFollow me on FaceBook