How to run 4.622 or later DP4 database utilities against an earlier DP4 release - A4000032 - 1 Jun 2005

The 4.622 release notes warn against attempting to mix components from 4.622 and earlier releases. However, provided you follow the instructions below you can run the 4.622/4.623 REORGDB or DBCHECK) against live databases that are used by an earlier DP4 release. There are good reasons why you might want to do this: you may be understandably nervous about upgrading an installation to 4.622; on the other hand the latest releases of REORGDB and DBCHECK are far superior to older releases: REORGDB can shrink the database and improve its performance substantially, and DBCHECK can spot corruptions that earlier releases of DBCHECK missed.

Instructions for creating a side by side installation of DP4 that leaves your original installation intact.

  1. Copy the system database files from your original installation to another name in the same directory, for example sys621.dat and sys621.ind. Also copy bd to bd621 if you will be needing bd (normally bd is not used in live environments).
  2. Use sysdb from your original installation to change the system database to the new system database name. (e.g. sysdb sys621).
  3. Stop and restart the DP4 service and run a program such as DFSETUP to check that the copied system database is functioning correctly.
  4. Now create a copy of your existing DP4 installation in a new directory such as \dp4623 or \623. There is no need to copy databases, but you should copy all your executable files, and the DP4 configuration files (dp4.sys,userdata.sys, dp4.ini). Edit dp4.ini in the copied directory and change the following entries in the so that you can identify the new DP4 installation easily (suggested new values are shown):

    [branding]
    odbc_name="DP4 Enterprise 4.622"
    prefix1=dp4622
    prefix2=dp5622
    service_name="ItimDP4622"
    service_title="DP4 Enterprise 4.622"
    [win32]
    loader=srvw32.exe -load
    
  5. Open a command prompt and log to the directory where the copied DP4 installation resides.
  6. Now run the DP4 installation program for release 4.623 (or 4.622).Click on the first "Install button", and then click on the text of "Base DP4 for Windows 9x/NT or later". The directory where DP4 will be installed is now shown. Check that this the new directory and not your live DP4 installation, and then click on install.
  7. The install program should successfully update the copied DP4 installation to 4.622 or 4.623, and both DP4 installations access databases from the original DP4 installation.
  8. If desired you can rename the new system database files to sys622 or something, and then rename the original system database files back to system. If you choose to so this you will need to run sysdb in both the original and the updated DP4 installation, and then restart DP4.
  9. Run DFSETUP in the updated DP4 installation and check that the location of temporary files is not the same as in the orginal DP4 installation. If you put temporary files in a hard-coded location such as c:\dp4\tmp you need to change this to read c:\dp4622\tmp (or whatever). This will guard against any problems that might otherwise arise if you were running utilities from both DP4 installations at the same time.
  10. You can now run utilities such as DBCHECK or REORGDB from your new DP4 installation against your existing databases. When using REORGDB make sure you don't change the structure of the database to one that is incompatible with your live DP4 installation. The only way you could do this would be by using the "Advanced Properties" dialog in REORGDB to change the structure, or by spcifiying th -advanced command tail.
  11. Whenever you run a 4.622 DP4 utility against a database, it is likely that the database will be marked as belonging to release 4.622 or later. When you have finished working on the database with release 4.622/4.623 use DBREVERT (dbrevert -db dbname) to render the database compatible with your existing DP4 release once again).

Alternatives

The instructions above are only a guideline - there are other ways to proceed. For example you could decide to make a completely separate DP4 installation without any common directories and to manually move databse files between the two sets of directories. However if you do this you must be very careful always to copy all relevant files, and remember to run DBREVERT before moving the database files back.

If you want to devise your own scheme for running 4.622 utilities against your databases the key points to remember are: