Home

Deprecated Oracle Multimedia (ORD*) packages and types should not be used

Description

    This rule detects any reference to Oracle Multimedia / Intermedia packages and object types whose names begin with ORD* (for example ORDImage, ORDAudio, ORD_VIDEO, ORDDoc, ORD_DICOM, ORD_IMAGE). All of these APIs were deprecated in Oracle 18c and are desupported from Oracle 19c and later. Code that continues to call them will fail to compile or execute after upgrading beyond 19c.

    Migration path: store media in SecureFiles BLOB columns (optionally compressed/deduplicated) and process images, audio, or video with external libraries or micro-services. Keep metadata such as width, height, MIME type, duration, or EXIF tags in relational or JSON columns.

Key Benefits

  • Upgrade Safety: Guarantees that PL/SQL code compiles on Oracle 18c and later.
  • Performance: SecureFiles BLOBs with advanced compression outperform the legacy ORD object model.
  • Security & Supportability: Removes dependencies on an unmaintained multimedia engine no longer patched by Oracle.
  • Maintainability: Simplifies schema design and enables best-of-breed, open-source processing pipelines.

 

Non-compliant Code Example

DECLARE img ORDSYS.ORDImage;       --Non compliant code
BEGIN
  ORDSYS.ORDImage.import(BFILENAME('MEDIA_DIR','pic.jpg'), img);       --Non compliant code
  INSERT INTO photos_mm VALUES (photos_seq.NEXTVAL, img, NULL);
END;
/

Compliant Code Example

DECLARE b BLOB; BEGIN
  DBMS_LOB.createtemporary(b, TRUE);                              
  DBMS_LOB.loadFromFile(b, BFILENAME('MEDIA_DIR','pic.jpg'),
                        DBMS_LOB.getLength(BFILENAME('MEDIA_DIR','pic.jpg'))); --Compliant code
  INSERT INTO photos_sf VALUES (photos_seq.NEXTVAL, b, 'image/jpeg', NULL, NULL, NULL);
END;
/
Visual Expert 2025
 VEPLSQLRULE201