database growth

  • Hi,

    i have a table called Table a

    CREATE TABLE [dbo].[TableA](

    [ServerName] [varchar](100) NULL,

    [DatabaseName] [varchar](100) NULL,

    [LogicalFileName] [sysname] NOT NULL,

    [PhysicalFileName] [nvarchar](520) NULL,

    [FileSizeMB] [money] NULL,

    [FreeSpaceMB] [money] NULL,

    [UsedSpaceMB] [money] NULL,

    [FreeSpacePct] [varchar](7) NULL,

    [FileSizeGB] [money] NULL,

    [FreeSpaceGB] [money] NULL,

    [UsedSpaceGB] [money] NULL,

    [Datetobeused] [datetime] NULL,

    [RecoveryMode] [sysname] NOT NULL,

    [Status] [sysname] NOT NULL,

    [Updateability] [sysname] NOT NULL

    ) ON [PRIMARY]

    Can anyone please tell to me how to create the monthly database growth.

    I need tsql script for this.

    Thank You very much

  • There are hundreds of scripts out there for things like this. I used Google to find this:

    http://sqlserverteam.blogspot.com/2008/11/monitor-database-growth.html

    There are probably better ones. Have a look around.

  • Thank You paul white

  • sql2k8 (7/16/2011)


    Hi,

    i have a table called Table a

    CREATE TABLE [dbo].[TableA](

    [ServerName] [varchar](100) NULL,

    [DatabaseName] [varchar](100) NULL,

    [LogicalFileName] [sysname] NOT NULL,

    [PhysicalFileName] [nvarchar](520) NULL,

    [FileSizeMB] [money] NULL,

    [FreeSpaceMB] [money] NULL,

    [UsedSpaceMB] [money] NULL,

    [FreeSpacePct] [varchar](7) NULL,

    [FileSizeGB] [money] NULL,

    [FreeSpaceGB] [money] NULL,

    [UsedSpaceGB] [money] NULL,

    [Datetobeused] [datetime] NULL,

    [RecoveryMode] [sysname] NOT NULL,

    [Status] [sysname] NOT NULL,

    [Updateability] [sysname] NOT NULL

    ) ON [PRIMARY]

    Can anyone please tell to me how to create the monthly database growth.

    I need tsql script for this.

    Thank You very much

    You may want to reconsider your Data Types, e.g. FileSizeMB (Money). 🙂

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

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

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