Network Management

Bulk update SMTP server settings in alerts

Use a SQL statement to replace one SMTP server IP value with another for multiple alerts.

First published date

10/19/2018 10:23 PM

Last published date

3/14/2022 7:12 AM

Overview

This article explains how to use a SQL statement to replace one SMTP server IP value with a different IP value for multiple alerts.

Product section

Network Performance Monitor

Resolution

  1. Before doing any work on your database please make sure that you have a current backup, as this will make a permanent change to your database - Backing Up, Restoring, and MIgrating Your Orion Databse.

  2. Open Database Manager (Start > All Programs > Solarwinds Orion > Advanced Features > Database Manager).

  3. Add Orion SQL Server as Default Server if not done already.

  4. Expand your Database.

  5. Run the following SQL statement:

    update [dbo].[ActionDefinitions]
    set Target = CAST(REPLACE(CAST(Target as NVarchar(MAX)),'SMTPServer:IP_OF_OLD_SMTP_SERVER','SMTPServer:IP_OF_NEW_SMTP_SERVER') AS NText)
    where CAST(Target AS nvarchar(max)) like '%SMTPServer:IP_OF_OLD_SMTP_SERVER%';
    
  6. Edit the above script where it shows 'IP_OF_OLD_SMTP_SERVER' or 'IP_OF_NEW_SMTP_SERVER' and replace them with the respective old or new SMTP server IP values from your environment.