AnsweredAssumed Answered

How to automate renaming of AF Server

Question asked by TrentHuhn on Jun 28, 2017
Latest reply on Jul 3, 2017 by TrentHuhn

Currently, we have a test environment consisting of a PI data archive and PI AF server. Currently, when we want to refresh the test environment, the underlying SQL database (PIFD) is copied down on-demand from our production environment. Following this copy down, there are a number of manual steps that I have to take in order to prep the environment for use (such as renaming the AF server, assigning a new ID, and updating all AF attribute PI point data references). I am currently in the process of trying to automate these steps so that we can refresh the environment on a more regular basis. I am attempting to do this via a batch file, since most steps involve running command-line utilities. The one step I'm having trouble with is updating the actual AF server name (i.e. 'AFSVRPROD01' -> 'AFSVRTEST01') following the copy-down. Currently, I accomplish this via the Connections dialogue in PI System Explorer.

 

Does anyone know if there is a command-line utility that would allow me to accomplish this? If not, would it be possible to update the 'Name' column of the AFSystemID SQL table directly with the new database name? I know directly modifying settings in the PIFD database is generally frowned upon, but this seems like a fairly straight-forward change.

 

Thanks,

Trent

Outcomes