Infor Applied Innovation

« | Main | »

Determine DB Differences Between Two Infor Landmark Installs

August 9, 2015

By Brian Hanson, Software Architect

There are many times when an Administrator would like to know the database differences between two Infor Landmark installations.  This might be to determine the difference between “test” and “production” instances.  For example, the following are instructions for determining the changes “dbupgrade” will need to do when the  version of the application running on a test environment is placed on the production environment.

Step 1 – get the current application product line dictionaries from the production environment

The following commands are run in the production environment.

We start by creating a temporary directory in LADIR called “dicts”.

Windows UNIX
c:\env\prod>cd %LADIR%
c:\env\prod>mkdir dicts
c:\env\prod>
[lawson ~]$ cd $LADIR
[lawson prod]$ mkdir dicts
[lawson prod]$

Now determine the name of the application’s productline dictionary by finding the productline ‘Stamp’ for the active product’s dictionary using “displaydict -d”. In this case the value is “1428686456”.

Windows UNIX
c:\env\prod>displaydict -d dbtest80 | head -4
DataArea dbtest80
Stamp 1428686456
ProdLine DBTEST80
EnvDataArea GEN
c:\env\prod>
[lawson prod]$ displaydict -d dbtest80 | head -4
DataArea dbtest80
Stamp 1428686456
ProdLine DBTEST80
EnvDataArea GEN
[lawson prod]$

Copy the productline dictionary formed by the lower case ProdLine name, a ‘.’, and the Stamp to the ‘dicts’ directory substituting a ‘1’ for the Stamp for the copied file name. In this case the ProdLine name is DBTEST80 so the source file will be “dbtest80.1428686456” in LARUNDIR/dict. The destination file will be “dbtest80.1” in dicts.

Windows UNIX
c:\env\prod>cp %LARUNDIR%\dict\dbtest80.1428686456 dicts\dbtest80.1
c:\env\prod>
[lawson prod]$ cp $LARUNDIR/dict/dbtest80.1428686456 dicts/dbtest80.1
[lawson prod]$

Once all dictionaries have been obtained, create the “dicts.zip” using the following “jar” command.

Windows UNIX
c:\env\prod>jar Mcf dicts.zip -C dicts .
c:\env\prod>jar tf dicts.zip dbtest80.1
c:\env\prod>
[lawson prod]$ jar Mcf dicts.zip -C dicts .
[lawson prod]$ jar tf dicts.zip dbtest80.1
[lawson prod]$

Transport the file “dicts.zip” to the test system and place in the LADIR directory.

Step 2 – Load those dictionaries onto the test environment and compare

The following commands are run in the test environment.

Go to the “dict” directory in LARUNDIR and unzip the files captured from production. Since the stamp ‘1’ was used for all the products, it will not conflict with any existing product line dictionary.

Windows UNIX
c:\env\test>cd %LARUNDIR%\dict
c:\env\test\run\dict>jar xf %LADIR%\dicts.zip
c:\env\test\run\dict>cd %LADIR%
c:\env\test>
[lawson test]$ cd $LARUNDIR/dict
[lawson dict]$ jar xf $LADIR/dicts.zip
[lawson test]$ cd $LADIR
[lawson test]$

Now determine the Stamp for the live product on test. In this case it is ‘1435002501’.

Windows UNIX
c:\env\test>displaydict -d dbtest80 | head -4
DataArea dbtest80
Stamp 1435002501
ProdLine DBTEST80
EnvDataArea GEN
c:\env\test>
[lawson test]$ displaydict -d dbtest80 | head -4
DataArea dbtest80
Stamp 1435002501
ProdLine DBTEST80
EnvDataArea GEN
[lawson test]$

Run the “comparedict” command with the “-p” and “-vr” options. The “-vr” tells comparedict to display the actions dbreorg would perform to transform from the old definition to the current definition.

Windows UNIX
c:\env\test>comparedict -vr -p dbtest80.1 dbtest80.1435002501
Rebuild File SupplierGroups.
* Added field BigNum
c:\env\test>
[lawson test]$ comparedict -vr -p dbtest80.1 dbtest80.1435002501
Rebuild File SupplierGroups.
* Added field BigNum
[lawson test]$

To see what rules will be performed by the “dbupgrade” command you can use “-vs –showrules”  instead of the “-vr” on the “comparedict” command above.

Windows UNIX
c:\env\test>comparedict -p –showrules -vs dbtest80.1 dbtest80.1435002501
Applicable field assignments
SupplierGroups.BigNum = 1
c:\env\test>
[lawson test]$ comparedict -p –showrules -vs dbtest80.1 dbtest80.1435002501
Applicable field assignments
SupplierGroups.BigNum = 1
[lawson test]$

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *



About this Blog

The latest innovations using Infor Technology