Submit a ticketCall us

WebinarUpcoming Webinar: Know What’s Changed – with NEW Server Configuration Monitor

Change management in IT is critical. But, even with a good change management process, changes are too often not correctly tracked, if at all. The configuration of your servers and applications is a key factor in their performance, availability, and security. Many incidents can be tracked back to an authorized (and sometimes unauthorized) configuration change, whether to a system file, configuration file, or Windows® Registry entry. Join SolarWinds VP of product management Brandon Shopp to discover how the new SolarWinds® Server Configuration Monitor is designed to help you.

Register now.

Home > Success Center > Network Performance Monitor (NPM) > Know each table size in Orion database

Know each table size in Orion database

Table of contents

Updated April 30th, 2016

Overview

This article provides steps on how to know the size for each table in Orion database. 

If you have a very large Database size we recommend to go through with Quick Orion database health check guide

Environment

All versions of NPM 

Steps

  • Manual Choice
  1. Go to Microsoft SQL Server Management Studio on Orion SQL server. (If you have not installed use the link to download
  2. Select New Query. 
  3. Paste the query below (change the Database name if it's different from the default NetPerfMon) and click Execute :

 

 

USE NetPerfMon
GO
CREATE TABLE #temp (
table_name sysname ,
row_count INT,
reserved_size VARCHAR(50),
data_size VARCHAR(50),
index_size VARCHAR(50),
unused_size VARCHAR(50))
SET NOCOUNT ON
INSERT #temp
EXEC sp_msforeachtable 'sp_spaceused ''?'''
SELECT a.table_name,
a.row_count,
COUNT(*) AS col_count,
a.data_size
FROM #temp a
INNER JOIN information_schema.columns b
ON a.table_name collate database_default
= b.table_name collate database_default
GROUP BY a.table_name, a.row_count, a.data_size
--ORDER BY CAST(REPLACE(a.data_size, ' KB', '') AS integer) DESC
ORDER BY a.row_count DESC
DROP TABLE #temp

 

 

 

Click Execute 

On this point you should be able to see each table with size and number or rows in each table . 

 

 

  • Use SQL Reporting
  1. Go to Microsoft SQL Server Management Studio on Orion SQL server. (If you have not installed use the link to download
  2. Right Click your SolarWinds database.
  3. Choose Reports > Standard Reports > Disk Usage by Table.

​​​​​​​

 

 

 

Last modified

Tags

Classifications

Public