Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Database size trending with powershell

By Gene Hunter,

you need to run the create table for both the ServerList and also the dba_server_database_sizetrend. After you do that you need to insert data for each column example in code above.

example of insert for table
Alias = Server1.com
Connection = 10.10.100.1,1433
 IP = 10.10.100.1

then you cut and paste the powershell script into a powershell file. Make sure you have codeplex SQLServer module installed. After you do this you can run the script and it will cursor trhough the list of servers in ServerList and populate database sizes in MB into the table.


      

Total article views: 2676 | Views in the last 30 days: 540
 
Tags
database    
powershell    
size    
trending    
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones