I came across a question in the Forum, how to calculate the growth of all databases in a server.
So, I set out with my research for the best solution.
Given below are the two methods to calculate the growth of all databases in the server:
- Via sp_MSforeachdb
- Via sys.master_files
Given below is the workout that will help you understand the best way to calculate.
Lets execute sp_MSforeachdb and view the statistics time.
After executing the above statement, I saw few server executions of sp_MSforeachdb. Given below is one of the server executions.
SQL Server Execution Times:
CPU time = 343 ms, elapsed time = 10050 ms.
Given below is the query that I copied from MS SQL Server profiler & modified it. (Just view growth from SSMS; you can find this query in the profiler)
View original post 120 more words