Submit a ticketCall us

Webinar: Web Help Desk for HR, Facilities and Accounting Departments
This webinar will focus on use cases for HR, Facilities and Accounting.

Having a unified ticketing and asset management system for all the departments in your company can provide end-users with a seamless experience and make things easier for your IT team. Yet, with different business tasks and objectives, many departments don’t fully understand the capabilities of Web Help Desk and how the software can be customized for effective use in their departments.
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
09:14, 28 Aug 2017

Tags

Classifications

Public