Submit a ticketCall us

Solarwinds & Cisco Live! Barcelona
Join us from the 29th of January to the 2nd of February at Cisco Live 2018 in Barcelona, where we will continue to show how monitoring the network with SolarWinds will keep you ahead of the game. At our booth (WEP 1A), we will demonstrate how SolarWinds network solutions can help. As a bonus, we are also hosting a pre-event webinar - Blame the Network, Hybrid IT Edition with our SolarWinds Head Geek™, Patrick Hubbard on January 24th - GMT (UTC+0): 10:00 a.m. to 11:00 a.m. There's still time to RSVP.

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