Dear Khy,
the "Warning: Package Body created with compilation errors" problem from is probably solved by https://cvs.openacs.org/changelog/OpenACS?cs=MAIN%3Aantoniop%3A20241203085139 (untested)
I cannot say much about the error "could not find program unit being called: "OPENACS_ORACLE_510.APM"" as I cannot test on an Oracle installation.
The last error probably starts in the code at https://github.com/openacs/openacs-core/blob/01e16620daf93eca4c5be64454ffeaca1628a887/packages/acs-tcl/tcl/acs-db-12-procs.tcl#L641 where the sql clause is generated for Oracle. It seems the tcl snippet for optional arguments does not get executed and the __optional_parameters variable is not expanded. Plus, there seems to be a semicolon too much prepended to the variable name... Again, unfortunately I cannot test on an Oracle installation, so I don't feel very confident to touch that, but maybe it will put you guys in the right direction to debug and provide a patch.
All the best
Antonio