When adding a .MDF (.NDF) or .LDF file to a SQL Server, we have the option to set its initial size, auto-growth, and incremental (percent or absolute).
After the database is in operation for a while, is it possible find how much of the actual size is used by the data? For example, if the actual size of the file is 5M, but only 2M is used to store the data, the file can still take 3M of data before it needs to grow.
I need a way to find out the "2M" (used size) in the total current size (5M) of the file.
If you have created the database with your own specific initial size parameter then NO, there is no way of knowing it unless, if you have scripted the db creation.
Otherwise, generally the default initial size is considered to be same as
modeldatabase. So, if it's default then you can check withmodeldatabase initial size which generally is3MB