August 24, 2010 at 8:21 am
by script how can I query for a file's initial size?
I want the same thing one finds by :
Start SQL Server Management Studio, view, object explorer, right click [dbname], properties, files, Database files: Initial Size (MB); howerver i am finding that the initial size header is not showing me the initial size but instead the "current size".
my question comes from that i have my log at 17 gbs when i run log backups every 15 minutes. I just want to confirm my initial size i set up for my log file. I am currently showing under database properties 17 gbs.
i already checked sys.files, sys.database_files, or sys.master_files, but no luck for "initial size"
August 24, 2010 at 1:56 pm
Would the sp_helpfile stored procedure be what you're looking for?
August 24, 2010 at 3:24 pm
How about:
select * from sys.database_files
(Size = # of 8k pages, so multiply size*8*1024 to get # bytes of the file. Or (size*8)/1024 to get # MB)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply