July 16, 2011 at 5:25 pm
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
July 16, 2011 at 11:38 pm
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.
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
July 17, 2011 at 8:27 pm
Thank You paul white
July 17, 2011 at 8:45 pm
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