1 Reply Latest reply on Dec 12, 2014 11:51 AM by lag

    Howto:  Updating the SMTP server and envelope sender for all advanced alerts and traps via database manager for NPM.


      I recently called into support and spoke with Jamie Kellerstrass (who is one of the stronger tools in the SW support arsenal) with one of those off-the-beaten path sort of questions and I thought the solution would be a strong candidate for a post on thwack.

      I developed this need so that I could accurately test my new NPM installation on a completely new installation to migrate to because our needs have outgrown our current installation of 9.5.

      These steps were performed on the latest patch rev of 10.1.1, including the no default html email patch.

      Also, I was told, incorrectly that this wouldn't work for the Traps and Syslog, but so far, it seems to have worked for the TrapActions table as well as the AlertDefinitions table.  They are essentially the same format and use the exact same field headers for both of these changes.

      To validate the selection, in my case it was to change the SMTP server IP that is hard set in the "Target" column in the AlertDefinitions and TrapActions tables:

      For advanced alerts:

      Select REPLACE(cast(Target as varchar(max)), '', '')
      From ActionDefinitions

      Validate the changes by looking at a refreshed RO view of the table, I typically copy and paste the contents of one of the rows into notepad and visually check it.

      If the result is as desired then:

      Update ActionDefinitions
      set Target=REPLACE(cast(Target as varchar(max)), '', '')

      Then, I wanted to change the envelope sender as well, so that I could create a nice little outlook filter to keep the spam out of my inbox:

      UPDATE ActionDefinitions
      set Parameter3=REPLACE(cast(Parameter3 as varchar(max)), 'username@host.domain.tld' 'testusername@host.domain.tld')

      To validate everything went as expected, take a look through the Parameter3 column of the table.

      To validate the SMTP Server change, look at the Target column.

      To do the same things with TrapActions is merely a matter of querying the trapactions table and replacing ActionDefinitions with TrapActions wherever it's found.