Category Archives: sysfiles

How to analyze SQL Server database performance using T-SQL

The performance of a database is the most challenging and critical part of database optimization. The challenge every DBA faces is to identify the┬ámost resource-intensive databases. This article talks about the natively available features that can accomplish the task of … Continue reading

Posted in SQL Server 2017, sysfiles, T-SQL | Leave a comment

Different ways to find Data, log and DB Size

Different ways to get the size of the┬ádata , log files and Databases Using Counters Querying sysaltfiles & sys.databases Querying sys.master_files   SELECT instance_name AS DatabaseName, [Data File(s) Size (KB)]/1024.00 [DataInMB], [LOG File(s) Size (KB)]/1024.00 [LogInMB], [Data File(s) Size (KB)]/1024.00 … Continue reading

Posted in SQL, sysfiles | Tagged , , | 4 Comments

Use FILEPROPERTY to find free space in all the database

The use of SpaceUsed property of the FILEPROPERTY function gives how much space is used also we can derive lot of other attributes of it such as free space and percentage of free space. For other versions of SQL you … Continue reading

Posted in databases_files, FileProperty, sp_msforeachDB, SQL, sysfiles | Tagged , | Leave a comment