Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Monitor Table Grow Expand / Collapse
Author
Message
Posted Monday, November 5, 2012 7:23 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, May 1, 2014 12:13 PM
Points: 115, Visits: 342
Hello

I need to Monitor which table growing for Database.
so please help me to do this.

I have no idea how to monitor growth of the tables.

Thanks
Post #1381077
Posted Monday, November 5, 2012 7:30 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Today @ 1:38 AM
Points: 165, Visits: 678
Hi,

you could use the script @:
http://blogs.technet.com/b/mdegre/archive/2009/10/14/determining-sql-server-table-size.aspx
Ensure that the data is stored in a persistent table instead of a #temp table.

Then you can also setup a SQL job to run the stored procedure at a set interval, e.g. every morning, which will append tot he table (add a date column to the table).
And finally you could create a small SSRS report against that table to view how the table(s) are growing over time.

HTH,

B
Post #1381080
Posted Monday, November 5, 2012 7:30 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 6:52 AM
Points: 5,131, Visits: 4,918
Something like the following would work

create table tablemonitor (name sysname, rows bigint, reserved varchar(100), data varchar(100), index_size varchar(100), unused varchar(100), datecollected datetime default getdate())
insert into tablemonitor (name, rows, reserved,data,index_size,unused) exec sp_msforeachtable 'sp_spaceused [?]'

Wrap the insert into a SQL job to execute daily, then you can query the table and see which tables are growing day by day.




Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1381081
Posted Monday, November 5, 2012 10:39 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, November 19, 2012 6:56 PM
Points: 104, Visits: 364
Thanks

This is Awesome, help me a lot.
Post #1381203
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse