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
Last published date
Overview
Product section
Resolution
-
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.
-
Open Database Manager (Start > All Programs > Solarwinds Orion > Advanced Features > Database Manager).
-
Add Orion SQL Server as Default Server if not done already.
-
Expand your Database.
-
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%';
-
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.