Submit a ticketCall us

Don’t fall victim to a ransomware attack
Backups are helpful, but sometimes that’s not enough to protect your business against ransomware. At our live webcast we will discuss how to protect against ransomware attacks with SolarWinds® Patch Manager and how to leverage log data to detect ransomware. Register now for our live webcast.

Home > Success Center > Network Performance Monitor (NPM) > 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.

(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. Right-click the Orion Database and select All Tasks > Shrink > 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 upto the last full backup.

 

Also, shrinking the database will cause fragmentation of the indexes, which can cause performance issues. It is best practice that 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. 
  3. Connect to your SQL server.
  4. Right-click the Orion Database and select All Tasks > Shrink > Files.
  5. Set the File Type to Log
    Note: The Filegroup is not an available option.
  6. Right-click the Orion Database and select All Tasks > Shrink > Reorganize pages before releasing unused space. 
  7. 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. 
  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. Right-click the Orion Database and select All Tasks > Shrink > 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
18:47, 1 Dec 2016

Tags

Classifications

Public