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.
- 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).
- Use sysdb from your original installation to change the system database to the new system database name.
(e.g. sysdb sys621).
- Stop and restart the DP4 service and run a program such as DFSETUP to check that the copied system database is functioning correctly.
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
- Open a command prompt and log to the directory where the copied DP4 installation resides.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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:
- Don't copy 4.622 executable files into a 4.621 installation on a one by one basis, except where 4.621 or 4.622 page of DP4 web site specifically allows this. If you do do this you should normally copy all the files from the 621a.zip file and no other files. Copying files onto any earlier DP4 release is generally not possible.
You are likely to end up with a completely broken DP4 installation if you try to devise your own "mix and match" set of programs. Programs such as dbcheck and reorgdb from 4.622 won't run on a 4.621 or earlier set up.
- Always remember to run dbrevert against databases you have opened with a 4.622 utility. It is harmless to run this utility against a database that has not been marked for 4.622 or later, and you could waste a lot of time if you leave the database inoperable with your live DP4 release because you forgot to run it.
- Make sure you use the correct system database when running 4.622 or 4.623 programs. There have been many changes to the maps on this database, and using the wrong version of the system database may at least confuse you, and at worst leave you with a broken database, or cost many hours of lost time.