
Dmitri Levin (Customer) asked a question.
The documentation incorrectly states:
“Note: When using PRODB to create a copy of a database, all the files of the database copy will reside in the same directory, unless a .st file already exists for the target database.”
The knowledge base corrects the documentation:
https://community.progress.com/s/article/P2724
“Documentation should clearly state that prodb does not accept extent directory (stated in st-file) other than working directory.”
The same article incorrectly states:
“Prodb actually always take the st.-file of the source db and places the extents in the current working directory.”
In fact, the prodb utility uses the target st file to create a void database, utilizing all the information from that file - with the exception of the paths to the extents.
It looks like an intended behavior, but it sounds like a bug.
Why is the utility allowed to ignore direct instructions from humans?
Why does prodb behave differently than procopy even though both utilities use the same _dbutil library?
I'm assuming this is a (possibly misguiged) ease-of-use thing.
If an existing .st file contains absolute pathnames, you'd end up with a conflict during when creating the file structure.
PROSTRCT CREATE will happly fail with a "File ...already exists. (12842)" in such a scenario, because you really don't want to have two database instances pointing to the same physical files.
But PRODB is mostly intended to quickly spin up test databases with minimal friction, so instead of risking such an error message, it strips out the pathnames etc. to avoid triggering one.
Prodb checks the syntax of a structure file:
Prodb also verifies whether any extent files already exist and issues the corresponding error messages:
By the way, the paths shown in the errors above are exactly the same as the ones specified in the structure file.
If a utility intentionally ignores paths, it should at the very least issue a warning.
This is definitely a bug - either in the utility itself or in the documentation.
> But PRODB is mostly intended to quickly spin up test databases with minimal friction
In such cases, we simply wouldn’t create a target structure file.