Database File Growth Report Script

  • Comments posted to this topic are about the item Database File Growth Report Script

  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • Thanks again for this useful post, however, when SP runs for 1st time, [DataUpdatedOn] is always null. I went through the 2 SPs but not sure I understand when this gets populated. Thanks for your help

  • Thanks for pointing this out. I missed to add the default datetime constraint for DataUpdateON column of the table. Please use below updated script to create the table-

    CREATE TABLE [DBUtility].[dbo].[tbl_DatabaseFileSpace](

    [InstanceName] [nvarchar](50) NULL,

    [DatabaseName] [nvarchar](50) NULL,

    [FileName] [nvarchar](50) NULL,

    [FileType] [nvarchar](20) NULL,

    [TotalSizeMB] [decimal](10, 2) NULL,

    [FreeSpaceMB] [decimal](10, 2) NULL,

    [PercentFreeSpace] [decimal](10, 2) NULL,

    [AutoGrowthMB] [decimal](10, 2) NULL,

    [MaxSizeMB] [nvarchar](50) NULL,

    [DataUpdatedOn] [datetime] DEFAULT GETDATE() NULL

    ) ON [PRIMARY]

    GO

     

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply