Salesforce

Can using PROCOPY and PROUTIL -C BUSY result in a corrupted target database?

« Go Back

Information

 
TitleCan using PROCOPY and PROUTIL -C BUSY result in a corrupted target database?
URL NameP26274
Article Number000145128
EnvironmentProduct: Progress OpenEdge
Version: All supported versions
OS: All supported platforms
Question/Problem Description
PROCOPY runs as background session: nohup procopy <sourcedb> <targetdb> &
Verifying if PROCOPY has finished using: proutil <sourcedb> -C BUSY
The resulting target database is then corrupted when next accessed
Inconsistency between timestamps on the target database and bi result error 9213
Steps to Reproduce
Clarifying Information
Will PROUTIL BUSY option indicate when a PROCOPY has completed?
Error MessageExtent <file-name> has a different last opened date <timestamp>, (9213)
Extent <dbname.bi> has a different last opened date <dbname.db>, (9213)
Defect Number
Enhancement Number
Cause
PROCOPY does not lock the source or target databases (no .lk file) so that when proutil -C BUSY is issued, the return message indicates that the database is not busy.  

Consequently, the "proutil -BUSY" operand does not cause the corruption.  It is just that the script incorrectly assumes that the database was not busy and could be accessed.  

When a new process makes a connection to the database before "procopy" was completed, it performed roll back recovery resulting in the bi file timestamps being out of sync with the 
(.db) master blocktimestamps.
 
Resolution
Rather than running the proutil -C BUSY to monitor the completion of the PROCOPY operation, consider:

(A) Running a query on the PROCOPY process in a loop to determine when the process ends:

$   ps -ef | grep procopy

- or -

(B) Send the output to a file and then monitor "procopy.out" for "Copy complete (6722)" before accessing the database:

$   nohup procopy <source> <target> > procopy.out &

- or -

(C) Place the "procopy" in a shell script which creates a file to indicate a copy is in process, and then delete the file when the PROCOPY process is completed. 
Workaround
Notes
Keyword Phrase
Last Modified Date7/12/2018 11:21 PM

Powered by