Difference between revisions of "Updating PTS"

From TMS Support Wiki
Jump to navigation Jump to search
Line 48: Line 48:
<li><strong>Back on the database server, carefully execute the DatabaseUpdate.sql script against the PTS database</strong></li>
<li><strong>Back on the database server, carefully execute the DatabaseUpdate.sql script against the PTS database</strong></li>
<li><strong>Monitor the output window for errors and deal with them</strong><br/>
<li><strong>Monitor the output window for errors and deal with them</strong><br/>
<i>Older versions of PTS 5 erroneously allowed the same username to be assigned to multiple users. This was eventually fixed, but the script cannot apply the fix while duplicates still exist in the table. Monitor the output window for any affected records and change the username of one of them using an UPDATE script on the AspNetUsers table.</i></li>
<i>Older versions of PTS 5 allowed the same username to be assigned to multiple users. This behaviour was eventually changed, but the script cannot apply the fix while duplicates still exist in the table. Monitor the output window for any affected records and change the username of one of them using an UPDATE script on the AspNetUsers table.</i></li>
<li><strong>Having fixed any issues, execute the update script again and monitor the output window for further errors</strong><br/>
<li><strong>Having fixed any issues, execute the update script again and monitor the output window for further errors</strong><br/>
<i>Repeat this process until the script completes with no errors.</i></li>
<i>Repeat this process until the script completes with no errors.</i></li>

Revision as of 13:26, 10 January 2023

End-user PTS 5 software updates are not covered by a standard support contract and are something we would only consider in very specific circumstances.

We are documenting the instructions here for completeness.

Update files

The files and folders included in a PTS update.

In the event that we provide the update files, you will likely be given a link to the appropriate PTS update repository on Sharepoint.

The relevant files are:

  • Report rdls
    New or updated report template documents.
  • SSRS Update Datasource for Reports Script
    The tools for uploading the new reports to your SSRS server and registering them.
  • DatabaseUpdate.sql
    The T-SQL script to update the PTS 5 database.
  • PTS 5.x.x.x Update.zip
    The updated files for the PTS web application.
  • PTSCommsSetup64.msi
    The matching PTS Comms Client installer for this version of PTS.
  • Web.config
    The updated web.config file.

Update guide

The aim of this guide is to summarise the steps involved so that a server and/or database administrator could understand and follow them. It will not include enough detail for a novice.

  1. Login to the SQL server using SQL Management Studio and locate the PTS 5 database
    Likely to be named "pharmacyDB".
  2. TRUNCATE the ELMAH_Error table
    This table can be huge and can massively increase the backup file size.
  3. Backup the database
  4. Login to the application server and locate the PTSWeb IIS application folder
  5. Delete everything from the Contents\Labels folder
  6. Create a backup of the PTSWeb folder
    Consider omitting the Content\Sounds folder. It's not important to back this up, and it will be quite large.
  7. Open IIS and locate the application pool that is handling the PTS 5 application and stop it
    The downtime starts now.
  8. Copy everything from the PTS 5.x.x.x Update.zip folder and drop it into the live PTSWeb directory
    You should have to confirm overwrites; make sure you do so.
  9. Copy the new web.config file and drop it into the live PTSWeb directory
    You should have to confirm an overwrite.
  10. Locate the old copy of the web.config file in the backup directory and open it in Notepad
  11. Locate the <connectionStrings> section and copy it
  12. Locate the new web.config file in the live directory and open it in Notepad
  13. Locate the <connectionStrings> section and paste the copy of the old <connectionStrings> section from your clipboard
    This process is to replace the placeholder connection strings from the PTS update with the working connection strings from your existing installation. Make sure you replace the entire <connectionStrings> section cleanly.
  14. Back on the database server, carefully execute the DatabaseUpdate.sql script against the PTS database
  15. Monitor the output window for errors and deal with them
    Older versions of PTS 5 allowed the same username to be assigned to multiple users. This behaviour was eventually changed, but the script cannot apply the fix while duplicates still exist in the table. Monitor the output window for any affected records and change the username of one of them using an UPDATE script on the AspNetUsers table.
  16. Having fixed any issues, execute the update script again and monitor the output window for further errors
    Repeat this process until the script completes with no errors.
  17. Restart the application pool
  18. Test that you can login to the application and that it reports the new version number
  19. Have your contact in pharmacy test the application (not including reports) and sign off on the update
    If pharmacy report no issues they can resume using the system normally at this point.

Updating reports