|
Definitions More Info. | Definition ID | 72 | Title | SQL | Category | SCRIPT | Definition | Database DB Veritabani FILE_SIZE_QUERY_nekadar_yer_kalmis | Definition Description | DECLARE @command VARCHAR(5000) SELECT @command = 'Use [' + '?' + '] SELECT @@servername as ServerName , ' + '''' + '?' + '''' + ' AS DatabaseName , CAST(sysfiles.size/128.0 AS int) AS FileSize , sysfiles.name AS LogicalFileName , sysfiles.filename AS PhysicalFileName , CONVERT(sysname,DatabasePropertyEx(''?'',''Status'')) AS Status , CONVERT(sysname,DatabasePropertyEx(''?'',''Updateability'')) AS Updateability , CONVERT(sysname,DatabasePropertyEx(''?'',''Recovery'')) AS RecoveryMode , CAST(sysfiles.size/128.0 - CAST(FILEPROPERTY(sysfiles.name, ' + '''' + 'SpaceUsed' + '''' + ' ) AS int)/128.0 AS int) AS FreeSpaceMB , CAST(100 * (CAST (((sysfiles.size/128.0 -CAST(FILEPROPERTY(sysfiles.name, ' + '''' + 'SpaceUsed' + '''' + ' ) AS int)/128.0)/(sysfiles.size/128.0)) AS decimal(4,2))) AS varchar(8)) + ' + '''' + '%' + '''' + ' AS FreeSpacePct , GETDATE() as PollDate FROM dbo.sysfiles' EXEC sp_MSForEachDB @command | RecordBy | cunay | Record Date | 15-02-2012 16:35:40 | Düzenle | | Kopyala | | Sil | | |
|
|