Click here to Skip to main content
15,886,017 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to get the growth rate of a set of databases held on my server, I have set them using the ALTER TABLE MODIFY FILE FUNCTION
I need to return them in a query so I can use in conditional formatting in SSRS to tell me if the growth rate I have set is adequate or if it needs increasing.
Posted

1 solution

I have found a solution on line which i am going to try and use

SQL
SELECT
  name,
  size,
  growth,
  status,
  size * 8 AS size_in_kb,
  size * 8 / 1024. AS size_in_mb,
  CASE WHEN status & 0x100000 > 0
       THEN growth
       ELSE NULL END AS growth_in_percent,
  CASE WHEN status & 0x100000 = 0
       THEN growth * 8 / 1024. END AS growth_in_mb
FROM sysfiles



this only returns the iformation for master trying to change to accept other databases in a loop.
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900