Submit a ticketCall us

Welcome to the NEW Success Center. Search all resources (documentation, videos, training, knowledge base articles) or browse resources by product. If you are unable to find what you are looking for, please contact us at customersuccess@solarwinds.com

 

 

 

 

Home > Success Center > ipMonitor > Monitor the size of database in MS SQL

Monitor the size of database in MS SQL

Table of contents
No headers


Within the ADO-QA Monitor, you can use the following query:

select size as Number_of_8KB_chunks from [database_name].dbo.sysfiles;

***This will give you the number of 8 Kilobyte chunks for the data file ([database_name].mdf)and the transaction log ([database_name].ldf)

select size*8 as Size_in_KB_Each from [database_name].dbo.sysfiles;

***This will give you the number of Kilobytes used by the data file ([database_name].mdf) and the transaction log ([database_name].ldf)


select sum(size)*8 as Size_in_KB_Total from [database_name].dbo.sysfiles;

***This will give you the total Kilobytes used by the data file ([database_name].mdf) and the transaction log ([database_name].ldf) together.

Last modified
21:40, 11 Oct 2015

Tags

Classifications

Public