Update Cityworks

Existing Cityworks sites cannot be updated to 23. Instead, a new 23 site will be installed that points to your existing database. The 23 site needs to be installed first, then your existing Cityworks site can be updated to Office. See the Introducing the New Cityworks Platform webinar that discusses other implementations of Cityworks 23 beyond running both a Cityworks 23 and Office Companion 23 site.

PREREQUISITES:

  • Before installing or updating Cityworks, the Microsoft server monitoring package called System Center must be deactivated.
  • If you are upgrading from 15.8.1 or older to 23.x, the latest 15.8.x Database Manager and Data Migration Tool must be run before a 23.x site is implemented to ensure your database is up-to-date and all data has been migrated correctly. See the Data Migration Tool 15.8 Guide for more information.
  • Review Reset Password before starting the install process. Security updates have been implemented at 23, therefore Forms Authentication users must reset their password when they log in to Cityworks 23.x for the first time.
  1. Navigate to where the Cityworks installer is located.
  2. Right-click the installer and select Run as Administrator to launch the installer.

The installer automatically checks to make sure all the prerequisites are installed. If an application is missing, the installer will display a message instructing you to install the needed prerequisites.

If all prerequisites are properly installed, two green check marks appear.

  1. Click Next.

The installer includes the following function:

  • Install: This option is used when first creating a Cityworks site. This is also used to first implement a new 23.x site using an existing database.

IMPORTANT: The impersonate user's password cannot contain special characters.

  1. Click Next.

  1. Select a Web Site under which the site will be installed. In this case, select Default Web Site.
  2. Give the site an Alias and define the physical path where the Cityworks files will be stored if the path is different from the default specified in Install Location.

IMPORTANT: The Alias must be different from the Office Companion Alias so that each site can be accessed separately, even though they are using the same database.

  1. Click Next.

The user data location can be set to Default, or you can enter a custom path that Cityworks will publish user data to.

  1. Select either Default or Custom. If you selected Custom, enter the Data Location.

  1. Click Next.

Key files encrypt data to provide greater security. If you are installing Cityworks 23.x for the first time, a key file needs to be generated.

  1. The Key File Location automatically populates. Edit the location if desired.

Once the installer is done running, the key file will be generated and saved at this location.

IMPORTANT: Once the key file is created, copy the key file and back it up in a secure location. If a server is destroyed and only one copy of the key file exists on that server, the encrypted data will be lost. The password must also be retained. If the password is lost, the encrypted data cannot be accessed.

  1. Enter a Key File Password and Confirm Password. The password must be at least eight characters long.

  1. Click Next.
  1. Enter the Scheme. The default is https.
  2. Enter the Host.
  1. Enter the Port, if desired.

The Path is automatically populated with the Alias.

  1. Select Enable Windows Authentication to set the site to use Windows Authentication and to make the corresponding changes in the app-settings.yaml file.
  1. Select the Timezone. The time zone can also be set in the app-settings.yaml file using the general.timezone key. See Appendix 1: Time Zone Values for more information.

For existing Cityworks databases, this is where you point your existing database to the new 23 site.

  1. Select either SQL Server or Oracle for the Cityworks database.
  2. Select Custom Connection String to enter the connection string manually, if desired.
  3. Enter the Server instance that the database resides on.
  4. Enter the Database name. If you are an existing client, enter the database of your existing site.
  5. Enter the user you want Cityworks to utilize in the Azteca User field.
  1. Enter the Azteca Password.

  1. Click Next.

There are two options for activating your license key: Online or Offline. Online is the preferred method, while Offline is only used in rare cases when a site is unable to reach the authorization servers that Azteca Systems uses. Please note that this is usually caused by a proxy server being involved with internet access at the site. See Offline Activation for more information.

  1. Select Online to activate the license key.
  2. Enter the License Key number.
  3. Click Activate. It is important to do this step to avoid issues when installing the site.

  1. When the license information has been retrieved and a success message displays, click Next.

  1. Verify that the site information is correct in the Review section and click Save.

You will be asked if you want to proceed.

  1. Click Yes.

A box with a status bar displays while the virtual application is created. This could take several minutes.

  1. Click OK.

NOTE: At this point, the site folders have been created under the alias and site location specified in the installer. These include the WebSite, cw-site, cw-site-data, DataMigrationManager, PluginManagerCli, and DatabaseManager folders.

IMPORTANT: The docx folder must be manually created or moved to the wwwroot folder when upgrading to 23.x.

Database Manager opens if .Net Framework 4.8 or newer is installed. If not, a message will display telling you to open and run Database Manager.

TIP: If you need to manually open Database Manager, it can be accessed under ...\inetpub\wwwroot\<site_name>\DatabaseManager\Cityworks.DatabaseManager.exe or from the Cityworks 23 download file that you downloaded from MyCityworks.

NOTE: If you are using PLL, before running Database Manager, please check the DEFAULT_DURATION_TIME value in the TASK table. If the value is not NULL, 0, or an increment of 15, update this via the Edit:Task panel in PLL Admin.

  1. Select either SQL Server or Oracle.
  2. Enter the Azteca user's password in the first text box.
  3. Select the server instance and Cityworks database from the drop-down lists.
  4. Click Login.

The Database Manager screen shows the progress while it checks the CWVERSION and migration history tables. Click Log to open or close the log. When the log is open, there are three options: Clear the contents of the log, Copy the log’s contents to clipboard, or Save the log’s contents.

Click the arrow next to Advanced Options for the following options:

  • Verify Database: This option verifies the structure of the Cityworks database and identifies any errors. The errors are displayed in the log, followed by a list of SQL scripts that can be run to correct the errors.
  • Check Database Version: This option checks the Cityworks database version.
  • Configure CWDBAs: This option allows for the configuration of Cityworks Database Administrator (CWDBA) users. A CWDBA is created during the installation of the Cityworks database. These users will have access to the Admins and Domains options in Designer via the home page or General tab.
  • Generate SQL: This option generates SQL syntax for the update. The syntax could be copied and ran directly against the Cityworks database outside of Database Manager.
  • Disconnect: This option disconnects from the Cityworks database.

IMPORTANT: The red Database is not up-to-date message might not appear under certain circumstances, such as when upgrading from one service pack to another of the same version (for example, 23 to 23.1). Even if it does not appear, you still need to complete the following steps to update the database.

  1. The Update Default Data check box is selected by default. If left selected, Database Manager will check the default data in each of the tables listed below and update the data if it does not match the default values. Check the default behavior for these tables. If you have modified any of the default data in these tables and feel like those changes could be altered based on this information, you should clear the Update Default Data check box before proceeding. Ask our support department for more information.
  • Data in these tables will always insert new or missing, and update existing records:
  • azteca.CODEDESCFIELD
  • azteca.DESCSCOREFIELD
  • azteca.DEPOSIT_TYPE
  • azteca.DISTRESSCODE
  • azteca.EMPRELTABLEFIELD
  • azteca.FEATURE_CONSOLE
  • azteca.FEE_TYPE
  • azteca.FLAG_SEVERITY
  • azteca.FUNCTIONS_LEVELS
  • azteca.INSPECTIONTYPE
  • azteca.REPORTCATEGORY
  • azteca.SOURCETABLEFIELD
  • azteca.SYSTEM_STATUS
  • azteca.SYSTEM_TABLES
  • azteca.TASK_TYPE
  • Specific codes involved with our Paver integration will also be updated like this.
  • Data in these tables will only insert new or missing records:
  • azteca.AUDIT_TRACE
  • azteca.FUNCTIONS
  • azteca.PWCODE
  • azteca.PWCODETYPE
  • azteca.QUERYFIELDCONFIGURATION
  • azteca.SYSTEM_TABLES_COLUMNS
  • Data in these tables is only insert if the table is empty:
  • azteca.CCTVSCORE
  • azteca.PWCONDSCORE
  • azteca.PWUNIT
  • azteca.TABLEFIELDMAP
  1. Click Update to V2023XXXX. You must do this step, regardless of which version of Cityworks you are upgrading from and to.

NOTE: When new tables are added to the database, they are not added to the PWSYSID table until they are populated through the Cityworks UI. This means that data imported to other tables is not added to the PWSYSID table until something else is added to that table via the UI.

Once the six steps have been successfully completed, users will receive a message indicating that the database was successfully updated. If not, the log will show where any issues were encountered. The Log also states any data migrations that need to be completed. See Data Migration Manager Guide for more information.

  1. Click Verify Database, found under Advanced Options, to identify any additional schema changes that need to be made. If there are any errors in the log after verifying the database, you can fix them by running the SQL scripts provided at the bottom of the log. For more information, see Knowledge Base article 11674: Upgrade Existing Cityworks Databases.

Once a 23.x site has been installed using an existing database, users logging in via Forms Authentication need to update their password when they log in for the first time. The password only needs to be reset once when upgrading to Cityworks 23.x or newer. See Reset Password for more information.

Now that Cityworks 23.x has been installed and the Database Manager has run, one more step is required before Office Companion can be implemented: any required migrations must be run in the Data Migration Manager first. See Category Custom Field Date Values Migration, Holiday Consolidation Migration, and PLL Contractors Migration for more information. If you've done the data migrations, your existing Cityworks site is ready to be updated to Office Companion. See the Cityworks Office Companion 23 Update Guide for more information.