Start a conversation

Implementation - Change config settings to move to a different server

Step 1 Backup

Backup all databases on server that you will and verify that the backups are valid.

Step 2 Install QES

When you install QES and the system asks for a server name enter in the name of the server. DO NOT USE (local).

If QES is already installed and does not currently connect to the new server required then go to the install location and edit the QES.exe.config file and change the server name and initial database to the correct values.

<connectionStrings>
   <add name="QES.Properties.Settings.DatabaseConnectionString" connectionString="Data Source=PRES04\QESQA;Initial Catalog=HZS_System;Integrated Security=False;" providerName="System.Data.SqlClient" />
</connectionStrings>
 

Step 2 Restore Databases

Restore HZS_System and company database(s) using SQL Server Management Studio (SSMS)

Step 3 Fix logins for newly restored DB

Fix up logins in SQL:

Run the following lines separately in both the HZS_System database as well as any company databases. 

The first line gives you a report of all the users that are not properly associated with a SQL Server account. The second line fixes them.

sp_change_users_login‘Report’
sp_change_users_login'Auto_Fix','HZS_User'

With newer versions of SQL the Auto_Fix is no longer used.  Use the following command instead:

ALTER USER HZS_User WITH LOGIN = HZS_User

Step 4 Fix connection strings to company database

  • Navigate to the install location of QES - Default is C:\Program Files (x86)\Horizons International\QES
  • Right Click on the QES directory
  • Click properties
  • Click security tab
  • Click the edit button
  • Click on users (or an account you are logged in as)
  • Click Allow in the full control line.
  • Click OK
  • Click Ok 
  • Edit the QES.exe.config file with notepad or other text editor.
<userSettings>
      <QES.Properties.Settings>
     <setting name="FontSize" serializeAs="String">
           <value>10</value>
        </setting>
     <setting name="ServerChange" serializeAs="String">
           <value>0</value>
        </setting>
     <setting name="NewServerName" serializeAs="String">
           <value>New</value>
        </setting>
     <setting name="OldServerName" serializeAs="String">
           <value>Old</value>
        </setting>
      </QES.Properties.Settings>
    </userSettings>
  • Change the ServerChange value from 0 to 1
  • Change the NewServerName setting from New to the name of your SQL Server instance where the QES backups were restored into.
  • Change the OldServerName setting from Old to the name of the server that the database was previously coming from.
  • Save and close the QES config file.
  • Launch QES. After logging in you MUST select the Horizons International company from the drop down.

When you run QES you will get the following message:  "DataSource=XXXXX;Initial Catalog=YYYYYY;...." 

This message is telling you, in the Data Source section, the name of the old server just in case you need it to update the configuration file above.

You will then get an error message saying the company cannot be connected to and then there will be a confirmation message saying that the connection string has been temporarily changed.

Open QES and go to the System Tab and then click On the “Company Registration” button

Use the drop down to open up all your companies and change the Server Instance field to the proper values.

Turn Off the ServerChange setting

Navigate to the install location of QES

Default is C:\Program Files (x86)\Horizons International\QES

Edit the QES.exe.config file with notepad or other text editor.

<userSettings>
      <QES.Properties.Settings>
     <setting name="FontSize" serializeAs="String">
           <value>10</value>
        </setting>
     <setting name="ServerChange" serializeAs="String">
           <value>1</value>
        </setting>
     <setting name="NewServerName" serializeAs="String">
           <value>New</value>
        </setting>
     <setting name="OldServerName" serializeAs="String">
       <value>Old</value>
        </setting>
   </QES.Properties.Settings>
    </userSettings>

Change the ServerChange value from 1 to 0

Save and close file.

QES will now be using your new server location.

 

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Jaydel Gluckie

  2. Posted
  3. Updated

Comments