Submit a ticketCall us

WebinarWebinar: A checklist for planning your Network Performance Monitor (NPM) upgrade

Are you ready for your next upgrade? To help you plan smoothly, join this webcast to learn more about, SolarWinds® Orion® Installer, SolarWinds Upgrade Advisor, Upgrades Guides, Training Videos, and other resources available. We’ll share key upgrade planning considerations, lessons learned from customers with practical advice from SolarWinds Product Experts. We’ll also give practical tips to identify the estimated time needed and resources, how to prepare the business and IT staff for changes, ways to plan for required system changes, and more.

Register now.

Home > Success Center > Orion Platform > Orion - Knowledgebase Articles > Shrink the size of the Orion Database

Shrink the size of the Orion Database

Table of contents

Overview

 

This article provides steps to decrease the size of the SolarWinds Orion Database to reduce the DB, Transaction Log files, and additional file groups size. This article is also part of Quick Orion database health check guide.

Environment

 

All supported versions of SolarWinds Orion Platform and modules that use an Orion database, more details here in Currently supported software versions.

Steps

************************************************************************************************
Warning: SolarWinds strongly recommends that you create a full SQL backup of your SolarWinds Orion database. The following procedure may remove all your existing data and modifications. See video on Backing Up. Restoring, and Migrating your Orion Database for more information.

************************************************************************************************
​​​​​​​*NOTE: SQL DB shrinks can cause data loss... This is not same as a ONLY shrinking the SQL LOGS. 

************************************************************************************************
 

(If you don't have a copy of this, you can download and install SQL Server Management Studio Express from Microsoft for free)

 

For large databases (more than 40GB in size) you should stop all Orion services before beginning this procedure. 

 

Shrinking the size of your database:

  1. Stop all Orion Services using the Orion Service Manager.
  2. Open the SQL Server Management Studio. You can download and install SQL Server Management Studio Express from Microsoft.
  3. Connect to your SQL server.
  4. Locate your Orion DB > Right Click > Properties > (Note Down the Size + Space Available).
  5. Right-click the Orion Database and select All Tasks > Shrink > Files. 
  6. Restart all Orion Services. The database should now have a decreased size. 

 

 

To shrink your main database file (.mdf):

  1. Stop all Orion Services using the Orion Service Manager.
  2. Open the SQL Server Management Studio. 
  3. Connect to your SQL server.
  4. Right-click the Orion Database and select All Tasks > Shrink > Files. 
  5. Set the File Type to Data and the Filegroup to Primary.
  6. Under the Shrink action, select the option to Reorganize pages before releasing unused space.
  7. Set the Shrink File to a value just above the minimum shown on the right, and then click OK. 
    Note: This step may take a while to complete, a few minutes per GB. 
  8. Restart all Orion Services. The main database should now have a decreased size. 

 

 

To shrink your Transaction Log File (.Idf):

Note: Shrinking the Transaction Log File will not work if the database is set to Full Recovery mode. This mode causes all transactions to be stored in the Transaction Log File to allow the DB to recover the last entries when required. A simple recovery will only allow recovery up to the last full backup.

 

Also, shrinking the database will cause fragmentation of the indexes, which can cause performance issues. The best practice is after you shrink the database you also run a reindexing job against the database to improve the performance.

 

  1. Stop all Orion Services using the Orion Service Manager.
  2. Open the SQL Server Management Studio and connect to your SQL server.
  3. Right-click the Orion Database and select All Tasks > Shrink > Files.
  4. Set the File Type to Log
    Note: The Filegroup is not an available option.
  5. Under the Shrink action, select the option to Reorganize pages before releasing unused space. 
  6. Set the Shrink File to 0 MB, and then click OK. 
    Note: This step may take a while to complete. A few minutes per GB. 
  7. It may be necessary to run the shrink several times
  8. Restart all Orion Services. The transaction Log file should now have a decreased size. 

 

To shrink your additional file groups (Applies to NTA / Netflow): If you do not have NTA  installed skip to step 9 

 

  1. Stop all Orion Services using the Orion Service Manager.
  2. Open the SQL Server Management Studio. 
  3. Connect to your SQL server.
  4. Right-click the Orion Database and select All Tasks > Shrink > Files.
  5. Set the File Type to Data, and the file group to FG1.
  6. Under the Shrink action, select the option Reorganize pages before releasing unused space. 
  7. Set the Shrink File to a value just above the minimum shown on the right, and then click OK. 
    Note: This step may take a while to complete. A few minutes per GB. 
  8. Repeat Steps 4 - 6  for each file group. 
  9. Once you have completed all file groups, right-click the Orion database and select All Tasks > Shrink > Database, and then click OK. 
  10. Restart all Orion Services. The additional file groups should now have a decreased size. 

 

 

 

Last modified

Tags

Classifications

Public