Easy way to get DB Measurements? My senior management would like to have some counts of database objects (databases, tables, rows, stored procedures, etc) to show complexity to the executive committee. Does anyone know of a quick way to get this information? I'm going after system tables to get the info and some use of sp_MSforeachdb, but I'm hoping maybe someone has a query stored somewhere they can share. Of course it's needed by tomorrow and it's already 3:43 pm. We're using Microsoft SQL Server 2008 R2. And if anyone has ever been in this boat before, is there anything else your management wanted to see?
TIA
Try sp_BlitzIndex with the @Mode = 2 switch for detailed inventories per database including object counts, row counts, and sizes. You can also use the @GetAllDatabases = 1 parameter for system-wide results. (Disclaimer: I’m one of the open source script’s authors.)