Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

From the downloaded Locate upgrade scripts folder in distribution zip file. For example, extract the /database/oracle/upgrade folder. This folder , /database/postgres/upgrade. This folder(s) includes a number of folders containing migration.sqland patch release SQL files, which upgrade the FlexDeploy schemas.

Warning

This documentation is for upgrade to FlexDeploy to 5.2 but this statement may still apply if your As part of FlexDeploy 5.4 upgrade, missing UK constraint was added for REL_METADATA_VALUE table. Please check that there are no duplicate rows by running following SQL prior to upgrade. If you find duplicates then contact us via support portal.

Code Block
languagesql
themeRDark
SELECT * FROM (SELECT REL_DEFINITION_ID, PIPELINE_METADATA_ID, COUNT(1) NUMROWS
FROM FD.REL_METADATA_VALUE
GROUP BY REL_DEFINITION_ID, PIPELINE_METADATA_ID)
WHERE NUMROWS>1;



Warning

If you are upgrading from version prior to FlexDeploy 5.1.2, run following SQL prior to running upgrade scripts and make sure no rows are returned. If there are any row returned, it is possible that migration may not work correctly, in which case contact us via support portal.

Code Block
languagesql
themeRDark
SELECT
    kd.property_key_name, k.*
FROM
    fd.property_key k,
    fd.property_key_definition kd,
    fd.property_value pv
WHERE
    k.property_definition_id = kd.property_definition_id
    AND pv.sequence_number = 0
    AND k.property_key_id = pv.property_key_id
    AND kd.is_encrypted = 'Y'
    AND k.is_encrypted = 'N'
    AND pv.property_value not in ('<NOT CONFIGURED>', '<OPTIONAL>');



Warning

FlexDeploy 5.1 migration included includes updates to Unique Constraint for FF.DB_PROPERTIES_DATA. If you are upgrading from version prior to 5.1, then run following SQL before running upgrade scripts. If you have duplicates then it needs to be fixed up prior to starting migration. Run following SQL to check if there are any duplicates. If there are duplicates, work with Flexagon support team to resolve prior to migration.

Code Block
languagesql
themeRDark
SELECT * FROM (SELECT DB_PROPERTIES_ID, SEQUENCE_NUMBER, COUNT(1) NUMROWS
FROM FF.DB_PROPERTIES_DATA 
GROUP BY DB_PROPERTIES_ID, SEQUENCE_NUMBER) 
WHERE NUMROWS>1;


You will need to execute one or more SQL script(s) from the version of FlexDeploy you currently have, up to the latest version. And they must be executed in that order.

Image Removed

Follow this guideline when deriving SQL files to be executed.

...

Image Added

Info

There is not an upgrade script for every version. For instance there is no upgrade script for upgrading FlexDeploy 5.6.0.0 or higher

  • Look at Build Version in About window.

Current version is before 4.6.0.0

  • You can find which files that you may have already executed by doing "select version, created_on, created_by from fd.fd_flexdeploy_version order by created_on desc" database query.
  • Or you can view list of patches by using Administration - FlexDeploy Patches in FlexDeploy.

6 to FlexDeploy 5.7.0.0. Simply skip to the next one needed, or stop if there aren't anymore.

See some examples below to help you understand database upgrade process.

Upgrading .0 to 5.0.0.0
Code Block
languagesql
titleUpgrading 5.03.0.0 (or 5.0.0.x) to to 5.5.1.0.0
linenumberstrue
v5.03.0.0-to-v5.13.0.02/migration.sql
Code Block
languagesql
titleUpgrading 4.6.0.0 (or 4.6.0.x) to 5.0.0.0
linenumberstrue
collapsetrue
v4.6.0.0
v5.3.0.2-to-v5.03.0.03/migration.sql
v5.03.0.03-to-v5.13.0.0/migration.sql
Code Block
languagesql
title
4
linenumberstrue
collapsetrue
v4.0-to-v4.0.1/migration.sql
v4v5.3.0.14-to-v4v5.0.2/migration.sql
v4.0.2-to-v4.0.34.0.0/migration.sql
v4v5.0.3-to-v4.5.0/migration.sql
v4.5.4.0.0-to-v4v5.64.0.01/migration.sql
v4v5.64.0.01-to-v5.04.0.03/migration.sql
v5.04.0.03-to-v5.1.0.0/migration.sql

...

4.0.

...

4

...

/migration.sql

...


v5.4.0.

...

4

...

-to-

...

v5.

...

5.0.0/migration.sql

...


Code Block
languagesql
titleUpgrading 5.4.0.3 (build time 4/23/2017 or earlier) 0 to 5.05.0.0
linenumberstrue
collapsetrue
v4.0.2-to-v4.0.3/403PatchRelease_04-24-2017.sql
v4.0.2v5.4.0.0-to-v4v5.0.3/403PatchRelease_05-01-2017.sql
v4.0.2-to-v4.0.3/403PatchRelease_05-5-20174.0.1/migration.sql
v4v5.0.2-to-v4.0.3/403PatchRelease_05-11-2017.sql
v4.0.2-to-v4.0.3/403PatchRelease_05-22-2017.sql
v4.0.2-to-v44.0.1-to-v5.4.0.3/403PatchRelease_06-14-2017migration.sql
v4.0.2-to-v4.0.3/403PatchRelease_07-19-2017.sql
v4.0.2-to-v4.0.3/403PatchRelease_07-24-2017.sql
v4.0.3-to-v4.5.0/migration.sql
v4.5.0-to-v4.6.0.0/migration.sql
v4.6.0.0v5.4.0.3-to-v5.04.0.04/migration.sql
v5.04.0.04-to-v5.15.0.0/migration.sqlsq


Code Block
languagesql
titleUpgrading 5.4.0.3 (build time 5/11/2017) 2 to 5.05.0.0
linenumberstrue
collapsetrue
v4.0.2-to-v4.0.3/403PatchRelease_05-22-2017.sql
v4.0.2v5.4.0.1-to-v4.0.3/403PatchRelease_06-14-2017.sql
v4.0.2-to-v4.0.3/403PatchRelease_07-19-2017.sql
v4.0.2-to-v4.0.3/403PatchRelease_07-24-2017.sql
v4.0.3-to-v4.5.0/migration.sql
v4.5.0-to-v4.6.0.0/migration.sql
v4.6.0.0-to-v5.0.0.0v5.4.0.3/migration.sql
v5.4.0.3-to-v5.4.0.4/migration.sql
v5.04.0.04-to-v5.15.0.0/migration.sql 
Code Block
languagesql
titleUpgrading 4.5.1 Patch Release 11-27-2017 to 5.0.0.0
linenumberstrue
collapsetrue
v4.0.3-to-v4.5.0/450PatchRelease_12-09-2017.sql
v4.0.3-to-v4.5.0/450PatchRelease_01-12-2018.sql
v4.0.3-to-v4.5.0/450PatchRelease_01-30-2018.sql
v4.5.0-to-v4.6.0.0/migration.sql
v4.6.0.0-to-v5.0.0.0/migration.sql
v5.0.0.0-to-v5.1.0.0/migration.sq

Executing migration filesExecuting migration files

Once you have decided which migration scripts to execute, you need to run them against your database using database specific tools in proper sequence.

Oracle

These scripts should be executed as system, sys sys, or another user which has privileges to create objects in other schemas, performs grants, etc.  You can load and execute these scripts using other tools such as Toad or SQL Developer, but the instructions here . Instructions below are for using the sqlplus client. Following is example of script execution for Oracle, for PostgreSQL & MySQL use appropriate tools to execute migration scripts.

Info
titlesqlplus

Oracle sqlus SQL*Plus is part of the Oracle Client, and may be executed on any host which has it installed. If the Oracle Client is not installed on the same host as where you are installing FlexDeploy, you can copy the scripts to another host which has it installed.

Make sure to spool output to a file, so it can be analyzed later if necessary.

To launch sqlplus:

Code Block
languagebash
export ORACLE_HOME=<your Oracle Home directory>
export ORACLE_SID=<the SID of your database>
spool migration4migration5.52.0.out #(change for each script execution so logs are preserved)
$ORACLE_HOME/bin/sqlplus #(login as sys or system when prompted)
SQL> <<execute scripts as shown above>>

If running on another host other than the database server, you must update your tnsnames file and and launch sqlplus as follows:

Code Block
languagebash
export ORACLE_HOME=<your Oracle Home directory>
export ORACLE_SID=<the SID of your database>
spool migration4migration5.52.0.out #(change for each script execution so logs are preserved)
$ORACLE_HOME/bin/sqlplus system@<tnsname>
SQL> <<execute scripts as shown above>>


For example,

Image Added

PostgreSQL

These scripts should be executed as postgres or another super user which has privileges to create objects in other schemas, performs grants, Image Removedetc. Change the bold text as needed in your environment.

Linux
  • Run FlexDeploy migration scripts. Type the password when asked. PostgresDDL.txt records the output of the script so that you can refer back to it later.
    • cd <Flexdeploy Unzip Folder>\database\postgres\upgrade\vx.y.0.z-v.a.b.0.c
    • /path/to/psql -U postgres -h hostname -p 5432 -d flexdeploy -a -b -e -f migration.sql > PostgresDDL.txt
Windows
  • Run FlexDeploy scripts. Type the password when asked. PostgresDDL.txt records the output of the script so that you can refer back to it later. 
    • cd <Unzip Folder>/database/postgres/upgrade/vx.y.0.z-v.a.b.0.c
    • C:\path\to\psql -U postgres -h hostname -p 5432 -d flexdeploy -a -b -e -f migration.sql > PostgresDDL.txt