Move an existing Plant Applications Database to New Server

About this task

When you move an existing Plant Application Database to a NEW server and you do not revoke permissions for the Plant Application SQL Users, then the upgrade fails and the log files indicate below error:

[] - <<processFiles>> C:\Program Files (x86)\Proficy\Proficy Server\Database\PreConfigure\0000_ADDPLANTAPPSUSERS.SQ_, LineNumber: 41: User, group, or role 'comxclient' already exists in the current database.

[] - <<processFiles>> ADO Error: #-2147217900, User, group, or role 'comxclient' already exists in the current database., Source: Microsoft SQL Server Native Client 11.0, SQL State: 42000, NativeError: 15023

Procedure

To continue with the upgrade, you must perform the following steps before starting the Plant Application Upgrade:
  1. Log into SQL Query Analyzer under a SYSADMIN Account.
  2. Set the Database to the appropriate Plant Applications Database Name.
  3. Execute the following script:
    EXEC SP_REVOKEDBACCESS 'ProficyConnect'
    EXEC SP_REVOKEDBACCESS 'ProficyDBO'
    EXEC SP_REVOKEDBACCESS 'ComXClient'
    GO
    EXEC sp_droplogin 'ProficyConnect'
    EXEC sp_droplogin 'ProficyDBO'
    EXEC sp_droplogin 'ComXClient'
    GO
    EXEC SPSUPPORT_CHANGEDBOACCOUNT
Once you run this script, then you can start the Plant Application Upgrade.