PalstatCAQ - migrate

 
BACK
ver: 2024-07-31

Migration is a complex process, based largely on the "PalstatCAQ - Installation", instructions, and it depends on what components you want to migrate. If you are planning to do both migration and update at the same time, it is possible, but it is advisable to do it with a time gap.

 

  • It is always recommended to backup databases before manipulating the application, especially before migrating MSSQL.
  • Before the migration process, ensure that all users are terminated and locked out of the CONFIG directory.

 

 

Migrate CAQdesktop


Procedure
 

  • Copy the CAQdesktop directory to the new server/NAS.
  • End the directory sharing on the old server.
  • Create a new CAQdesktop directory share with READ&EXECUTE rights for the desired user group.
  • Make sure to modify the shortcuts on the client stations to the new share name.
  • Perform a test run of the application from the new share. (../APL/Launcher.exe)

Migrate CAQservice

The CAQservice is tightly bound to the name of the machine it runs on and must be called from the "System Administration" ./APL/CAQadmin.exe function at the end of the migration process to unblock it. If this operation is omitted, the service will stop sending notification and reporting emails.

 

In this case, you will find "MAIL BLOCKED / service registration ..." errors in the windows system log.

 

 

Procedure
 

  • The service can serve and process data files with a fixed directory for the source data. This must be taken into account in the migration and you must find out in advance whether such a task is running.
    • Open ../CAQdesktop/APL/CAQadmin.exe
    • Go to the "Scheduler" tab
    • Explore the scheduled tasks in their settings here, or consult further with Palstat engineers
    • This functionality does not prevent the migration of the service, but it is necessary to bring it to a functional state within a short period of time after the migration.
  • Stop service on the old machine.
  • Run the batch file as administrator "../CAQservice/CaqService.UnInstall.bat", the command will remove the service from the system.
  • Move the CAQservice directory to the appropriate location on the new win64 machine and follow the installation instructions.
    • Edit ../CONFIG/Palservice.xml (new lan adapter/IP where the service should listen)
    • Install service "../CAQservice/CaqService.Install.bat"
    • Provide throughput to the configured port.
    • For the child components CAQdesktop, CAQapi, CAQweb edit ../CONFIG/config.xml (IP/port)
    • Verify service functionality.
  • Run the CAQdesktop application "System Administration" ../CAQdesktop/APL/CAQadmin.exe.
  • Go to the "Diagnostics" tab and click on the "TEST" button next to the "CAQservice" window.
  • In the "Commands" menu, select "Update mailing machine registration" and click "Run".
  • Next, you can use the "Diagnostics" -> "Log" -> "Mail" tab to see if the application starts writing more messages to the log and if the log contains errors.

Migrate CAQapi and CAQweb


Procedure
 

  • New server
    • Prepare the environment with the IIS server according to the installation instructions.
    • Copy the CAQapi and CAQweb directories.
    • Set the IIS service access rights for the directories.
    • Connect the directories to IIS according to the installation instructions.
  • Old server
    • In the "Internet Information Service" application for IIS, search for the original Sites/Applications
    • Select "Remove" via the right button
    • The application will remain on the disk but will not be published to IIS
  • The new URL of both components must be written into the configuration ../CAQservice/CONFIG/config.xml
  • Restart CAQservice
  • Open the URL of both components in the browser to verify functionality (the first start is long).

Migrate Microsoft SQL Server

WARNING, this is a standard system migration solution that may not be applicable to every customer. In particular, customers with a connection to an information system will need additional testing of the migration and connection to the information system. In some cases it is not possible to migrate MSSQL database backups e.g. from SQL2005 to MSSQL2019 (test beforehand).

 

Preparing

  • Make sure you have access to the Palstat CAQ customer portal before the migration.
  • Before migration, find out where the PalstatCAQ system service called "Caqservice" is running.
  • Migrate to the latest possible version of MSSQL in accordance with HW/SW requirements.
  • Migration can be ordered as a service.
  • It is advisable to coordinate the migration with our service support and inquire in advance about the availability of technicians at the scheduled time.

 

Reaktivation a License

When migrating the system to another MSSQL server, the activation of the system will fail and the program may signal that it is not activated and will not even allow it to start. In this case, you must log in to our customer portal and search for an overview of available licenses in the LICENSE menu. This will probably indicate that the LICence is blocked. You have to use the "RELEASE" option.


ATTENTION: this function can only be used once per month

 

Old server

  • Stop working on all client PCs.
  • Stop sharing CAQdesktop or use a lock to lock out users so that no one can accidentally start the version from the old server or during the migration.
  • Back up the database "pal3g_*" under the user "pal" using Management Studio.
  • Move the database backups to the new server.
  • Rename the MSSQL databases on the old one to e.g. "*_migrated," this will ensure that no user will write to the old database by mistake or misconfiguration. Databases can also be switched to OFFLINE.

 

New server

  • Must meet system requirements
    Install the new MSSQL server according to the installation instructions.
    • SQL server must be installed in MixedMode authentication
    • SQL Server must have TCP/IP and NamePipes enabled
    • Enabled FireWall throughput
  • Create the user "pal" on the SQL server, assign him high privileges to be able to perform restore e.g. sysadmin, it is advisable to disable the "password policy" for the user.
  • Restore the databases and make sure that the databases are in CZECH_CS_AS encoding, the owner was the user "pal" which you can ensure by running the below command over each PALSTAT database sp_changedbowner "pal";
  • Remove sysadmin rights from user "pal".
  • In the folder where CAQservice is running, search for ../CONFIG/database.enc and edit the "Data Source" values, of which there may be more than one in the file, username and password. If the file is unreadable, it means that it is encrypted and you must use the utility ../APL/Constreditor.exe, which after running must be supplied with the encryption key, which is often in the CONFIG directory, and then edit the configuration file in the graphical environment of the program.
  • Restart the CAQservice
  • If a lock was used to block users, rename it again to *.bak
  • Perform a test run of ../CAQdesktop/APL/Launcher.exe
  • If it cannot be run then the most likely problems are:
    • On the new server, MSSQL is installed as an instance and it is necessary to include MSSQL including the instance in DATASOURCE, not just the IP or name.
    • The user "pal" is not the owner of the databases and the restore was accidentally done under the user SA or windows/Administrator.
    • MSSQL does not have TCP/IP, NamePipes enabled and does not listen on 1433. Common when using MSSQL Express.
    • MSSQL browser service is not running.
    • Firewall is blocking access to MSSQL.
    • There is no recommended .NET version on the client.

 

Client station

  • From the client's point of view, not much changes.
  • The client application communicates with the CAQservice on the configured port.
  • If CAQdesktop cannot be started from the client station, but the server can, the most likely problems are:
    • The firewall blocks client access to MSSQL or MSSQL Browser.
    • MSSQL does not have TCP/IP enabled and does not listen on 1433.
    • The MSSQL browser service is not running.
    • There is no recommended .NET version on the client
https://www.palstat.cz/