Use DB_Name-- Mention database name to get the details go select name , filename, (growth/1024) as Growth_MB , convert(decimal(12,3),round(sf.size/128.00,2)) as FileSize_MB , convert(decimal(12,3),round(fileproperty(sf.name,'SpaceUsed')/128.00,2)) as SpaceUsed_MB , convert(decimal(12,3),round((sf.size-fileproperty(sf.name,'SpaceUsed'))/128.00,2)) as FreeSpace_MB from dbo.sysfiles sf
Thursday, 19 June 2025
DBA-Database mdf & ldf files size, used space, Free space in MB
Subscribe to:
Post Comments (Atom)
SQLDBA- SQL Server Wait Events
To solve slowness of SQL Server database, you should find which wait events exists in the database. You can find wait events of database w...
-
Script out the Linked server objects. CREATE PROCEDURE [dbo].[win_linked_server_objects_extract_select] AS /************...
-
-- Health and status of WSFC cluster. These two queries work only if the WSFC has quorum SELECT * FROM sys.dm_hadr_cluster SELECT * FROM sy...
-
Start-Transcript - path C:/Script/PingLog.txt -Append Ping.exe -t spiceworks.com | ForEach { "{0} - {1}" -f (Get-Date), $_ } ...
No comments:
Post a Comment