Documentation Center

Running Content Delivery relational database upgrade scripts

To upgrade the relational databases, run one of the Powershell upgrade scripts.

Before you begin

Before performing the upgrade, ensure the following:
  • Ensure that your current database has all the latest hotfixes installed.
  • If you upgraded your database server to a supported version, ensure that you have closed all connections to your database server.
  • Ensure that you have details of DBA and user credentials and the names of the databases handy.
  • Ensure that you have removed any manually applied indexes.

About this task

The steps below explain how to upgrade one database. Repeat them for every database you want to upgrade.

Procedure

  1. For safety reasons, back up your database.
  2. On a system that meets the prerequisites for database installation and upgrade scripts, open PowerShell.
  3. In PowerShell, depending on your database navigate to one of the following folders on the installation media:
    • For a Microsoft SQL Server, AWS RDS-MSSQL or Microsoft Azure database, navigate to Database\MSSQL\
    • For an Oracle database, navigate to Database\Oracle\
  4. For a Microsoft SQL Server database, you can add an -IntegratedSecurity switch to let the script know that you want to use the current Windows account credentials to access the database, rather than specifying a database username and password.
  5. For Oracle databases, specify a host, port, service name and other connection information for the PowerShell script, either before or while running the script:
    • Before you run the script, you can define a variable in PowerShell, let's say $MyDatabaseServer, and set it to your connection string. When you invoke the script, you then append the string -DatabaseServer $MyDatabaseServer to the PowerShell command.
    • Alternatively, you can just invoke the script as is, and while you run the script, PowerShell prompts you for a value for Net Service, and you can then enter one of the following:
      • Enter the Net Service Name for this database if you have defined a Net Service Name in a tnsnames.ora file and specified the location of that file in a TNS_ADMIN environment variable.
      • Enter the string %manual% to let the script prompt you for the following: Host name, Port and Service name.
      • Enter the actual connection string directly on a single line if you have more to provide than just a host, port and service name. For example:
        (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))(CONNECT_DATA = (SERVICE_NAME = ora)))
  6. Depending on the relational database you are upgrading, run one of the following commands:
    DatabaseCommand
    Discovery database& '.\Upgrade Content Data Store'
    Content Data Store& '.\Upgrade Content Data Store'
    State Store database (optional)& '.\Upgrade Deployer State Store'
    The script interactively asks you to specify parameter values for the script, suggesting defaults where possible. Ensure that each of the databases you create has a unique name.
  7. While running the database upgrade script, you may encounter checksum errors that look like the following:
    2020-10-30 10:30:49 Unexpected error running Liquibase: Validation Failed:
         1 change sets check sum
              11.0/migration/broker.sqlserver_surrogate_key.xml::7561bed3-ba35-4bab-a6cd-00f749de6733::tridiondbmanager was: 
    8:235172ff0da5fa847b2e644e3b28faa3 but is now: 8:6592db6510486979567a0db0faefd7b7
    liquibase.exception.ValidationFailedException: Validation Failed:
         1 change sets check sum
              11.0/migration/broker.sqlserver_surrogate_key.xml::7561bed3-ba35-4bab-a6cd-00f749de6733::tridiondbmanager was: 
    8:235172ff0da5fa847b2e644e3b28faa3 but is now: 8:6592db6510486979567a0db0faefd7b7
            at liquibase.changelog.DatabaseChangeLog.validate(DatabaseChangeLog.java:291)

    The error is formatted as follows: FILEPATH::CHANGESETID::AUTHOR was: OLDCHECKSUM but is now: NEWCHECKSUM

    If there are only one or two such checksum validation failures, you should ensure that the script will ignore them. (If there are more than one or two checksums to be cleared, then contact RWS Customer Support.) To make the script ignore the checksum validation failures, copy-paste the changeset ID or IDs mentioned in the error message into a text document. (In the above example, the changeset ID is 7561bed3-ba35-4bab-a6cd-00f749de6733.) Then rerun the script. When it gives you a prompt called Comma-separated checksum to clear, provide all the changeset IDs you collected as a comma-separated list. The script now ignores the checksum failures.