T32-2021: Installing BIOVIA Direct into an Oracle Pluggable Database that has the PATH_PREFIX parameter set
BIOVIA Direct 2017
Program
BIOVIA Direct 2017 and higher
Operating System
All operating systems supported by the specific BIOVIA Direct version
Background
Oracle version 12c introduced Oracle Multitenant Architecture, which implements container (CDB) and pluggable (PDB) databases. If you are using CDBs/PDBs, you must install BIOVIA Direct into a PDB. With a default PDB configuration, the installation into a PDB is not different from an installation into a classic (non-CDB) Oracle database.
However, PDBs include options for keeping PDBs separate from each other. For example, PATH_PREFIX, which you can specify at PDB creation time, points to a file system path on the Oracle server that limits the PDB's file system access to that path or its subdirectories. Additionally, some Oracle functionality that typically uses absolute file system paths require the use of a DIRECTORY object when used with a PDB that has the PATH_PREFIX parameter set.
Based on that, the installation instructions for BIOVIA Direct versions 2017 and higher might fail if the database used is a PDB that has the PATH_PREFIX parameter set. You can check if your PDB has the PATH_PREFIX parameter set by running the command:
SELECT * FROM database_properties WHERE property_name='PATH_PREFIX';
The failure typically occurs during installation when the mdllibdef.sql script is executed in the scope of either the mdlinst_all.sql or the mdltestlistener.sql script. For example:
a) When running mdltestlistener.sql:
Errors for PACKAGE BODY MDLTESTLISTENER:
LINE/COL ERROR
-------- ----------------------------------------------------------
3/4 PL/SQL: Item ignored
7/15 PLS-00905: object C$DIRECT2021.MDLDIRECT is invalid
ERROR:
ORA-04063: package body "C$DIRECT2021.MDLTESTLISTENER" has errors
b) When running mdlinst_all.sql:
[…]
Warning: Library created with compilation errors.
[…]
71/4 PL/SQL: Item ignored
75/15 PLS-00905: object C$DIRECT2021.MDLDIRECT is invalid
[…]
ERROR at line 1:
ORA-04063: package body "C$DIRECT2021.MDLAUXOP" has errors
To avoid these errors, you must modify particular parts of the standard Direct installation workflow as discussed in the Solution section.
Solution
The following parts of the BIOVIA Direct installation differ from the standard installation when you install into a PDB with the PATH_PREFIX set.
BIOVIA Direct Installation directory
Decide on an installation directory before you start installing BIOVIA Direct. In general, you can specify any file system path on the Oracle server. However, when using a PDB with the PATH_PREFIX set, the installation path of BIOVIA Direct must be in the path set by PATH_PREFIX or in one of its subdirectories. For example:
/my/PDB/path/prefix/BIOVIA/direct2021 -- Linux
C:\my\PDB\path\prefix\BIOVIA\direct2021 -- Windows
Once you have decided on the installation directory, start the BIOVIA Direct installation as outlined in the BIOVIA Direct Installation Guide for your platform.
Modifying the Application Files
As part of the BIOVIA Direct installation, and as outlined in the respective Direct Installation Guide for your platform, you must modify the mkdirect.sql and mdlibdef.sql scipt files located in the sql subdirectory of the BIOVIA Direct installation directory. If you are using a PDB with the PATH_PREFIX set, the modifications to these files are different from the standard installation instructions as follows:
a) Changes to mkdirect.sql:
In addition to the changes described in the Installation Guide, add two lines at the end of the mkdirect.sql file:
CREATE DIRECTORY DIRECT2021_BIN19 AS 'BIOVIA/direct2021/bin19/'; -- Linux
CREATE DIRECTORY DIRECT2021_BIN19 AS 'BIOVIA\direct2021\bin19\'; -- Windows
GRANT EXECUTE ON DIRECTORY DIRECT2021_BIN19 TO C$DIRECT2021;
The path entry in the CREATE DIRECTORY statement is a relative (!) path to the path defined in PATH_PREFIX. It points to the respective bin subdirectory of the designated Direct installation directory. Use bin19 when running Oracle version 19, and bin12 when running Oracle version 12. Note that you must add the trailing slash or backslash to the path.
The user name C$DIRECT2021 specified in the GRANT EXECUTE statement refers to the Oracle schema owner of BIOVIA Direct version 2021, and is the same username that is used elsewhere in the mkdirect.sql script. If you install a different version of BIOVIA Direct, you must adjust the username accordingly. Likewise, the directory object name DIRECT2021_BIN19 is just an example meant to indicate the Direct 2021 version and bin19 directory used—you can select a different object name if desired.
b) Changes to mdllibdef.sql:
According to the Installation Guide, you must also modify the CREATE LIBRARY statement in the mdllibdef.sql script to include the full path to the main BIOVIA Direct library like this:
-- Linux
CREATE OR REPLACE LIBRARY MDLDIRECT IS
'/opt/BIOVIA/direct2021/bin19/mdldirect.so'
AGENT 'DIRECT2021_AGENT';
/
-- Windows
CREATE OR REPLACE LIBRARY MDLDIRECT IS
'C:\BIOVIA\direct2021\bin19\mdldirect.dll'
AGENT 'DIRECT2021_AGENT';
/
However, when using a PDB with PATH_PREFIX set, you must change the CREATE LIBRARY statement to use the Oracle directory object as created with the above modification to the mkdirect.sql script:
-- Linux
CREATE OR REPLACE LIBRARY MDLDIRECT IS
'mdldirect.so' IN DIRECT2021_BIN19
AGENT 'DIRECT2021_AGENT';
/
-- Windows
CREATE OR REPLACE LIBRARY MDLDIRECT IS
'mdldirect.dll' IN DIRECT2021_BIN19
AGENT 'DIRECT2021_AGENT';
/
How to contact BIOVIA Support
If you have any questions, please contact BIOVIA Support.