Dmitri Levin (Customer) asked a question.

Why does the prodb utility ignore the paths to database extents specified in the target st file?

The documentation incorrectly states:

https://docs.progress.com/bundle/openedge-database-management/page/Create-a-database-with-the-PRODB-utility.html

“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?

 


Peter Judge and Mike Fechner like this.
  • Frank Meulblok (Customer)

    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.

  • Dmitri Levin (Customer)

    Prodb checks the syntax of a structure file:

    1. proenv>prodb sports sports
    2. Procopy session begin for user on CON:. (451)
    3.  
    4. FakePath must be a directory name or follow the convention sports_8.d1. (6857)
    5.  
    6. Syntax error in structure file at line 8
    7. d "Customer/Order Area":8,32;8 FakePath .
    8. Invalid extent name. (12841)
    9. mvDbCreate failed!
    10. Procopy session end. (334)

    Prodb also verifies whether any extent files already exist and issues the corresponding error messages:

    1. proenv>prodb sports sports
    2. Procopy session begin for user on CON:. (451)
    3.  
    4. Syntax error in structure file at line 8
    5. d "Customer/Order Area":8,32;8 .. .
    6. File .\sports_8.d1 already exists. (12842)
    7. mvDbCreate failed!
    8. Procopy session end. (334)

    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.