Consultor Eletrônico



Kbase P55992: How to restore Dictionary Library from backup to another location
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   15/10/2008
Status: Verified

GOAL:

How to restore Dictionary Library from backup to another location

FACT(s) (Environment):

IBM AS/400 (RISC)
Progress/400 DataServer

FIX:

When restoring Dictionary Library from backup (tape) to a different library, you have to remember that the paths to the data objects (logical and physical files) are stored in the schema P__ files, and the name of the database library is kept in P__DB file. This makes it impossible to use the server schema immediately after having been restored. This can happen often when there is a need to create a test environment from the backup of the production database.

One of the possible solutions would be to restore objects (RSTOBJ) to a temporary library and then run DUPPRODB (with CPYOPT set to *FULLCPY) command to copy the server schema to the required destination. It will duplicate the objects and update the schema files. However, this method requires this to be performed whenever the test database is restored.

Another, more convenient solution is to separate server schema location from the data objects library. To do this do:
1. Create an empty server schema using DUPPRODB from *PROEMPTY.
2. Restore objects to another location
3. Delete the P_* files from the library. (See note below)
4. Update the server schema with CHGPRODCT using the data objects just restored.

After that the next time there is a need to refresh the database the only step that will have to be performed is the restoration of the data objects from a tape. The schema files will still point to the right location.

Remember that the CRC can change from the restore. The workaround for this is to either use -Dsrv LFLVLCHK parameter or run UPDSCHCRC. These will work provided there have been no schema changes. If the schema does changed then all steps need to be repeated.