How can I get the sizes of databases into the cmdb_ci_db_mssql_instance table?

Breizh
Tera Contributor

We have a need to report the sizes of the various databases on numerous SQL Server instances (roughly 100+ instances). At this point, we do not need to be as granular as size on a per table basis, just the databases themselves. Can anyone suggest a way to achieve that?

4 REPLIES 4

Robert Kawicher
Tera Contributor

Hi, I did not see any reply on your question. Did you find any solution for getting the size of MS SQL databases?

Bruno Martin
Tera Expert

Hello guys,
Any news here for getting the size of MS SQL databases?
Thanks

Paul Bankston
Tera Contributor

I also need to perform the same function.  It looks like it may entail the use of a MID server and writing SQL or PowerShell scripts.

 

Breizh
Tera Contributor

We ended up with a rather convoluted approach. We have a "utility" server that acts as a REST target for ServiceNow. Within that server, we run python scripts than in turn query all our SQL instances and returns a JSON payload back to ServiceNow.

 

We could have done it with a workflow that would use a PowerShell step (running on a MID server) to return a JSON package. That package could then be process by a Javascript. You could also just use PowerShell to call your ServiceNow instance directly and push the data that way.