UTL_FILE
Survived by a workaround.
✓ certified by the mortician
In life
UTL_FILE gives PL/SQL a stream-style interface for reading and writing text files on the database server: open a file in a directory object, read or write lines, copy, rename, remove and inspect files. Access is controlled by READ and WRITE privileges on directory objects, files are accessed as the database's operating-system user, line length is capped at 32767 bytes, and symbolic links are not followed.
Migrations care because file input and output from inside the database is a pattern the Azure PaaS targets do not offer. Every UTL_FILE call marks an integration point (nightly extracts, inbound feeds, application logs) that must become an external process, a Blob Storage interaction or a message. The directory objects also record which server paths the application depended on.
The package is supported and not deprecated. What changed is its configuration: since 18c only directory objects are accepted, because the UTL_FILE_DIR parameter was desupported and symbolic-link paths stopped working.
Cause of departure
Not deprecated by Oracle. Listed here because Azure offers no clean equivalent.
Obituary
UTL_FILE, a PL/SQL feature introduced before 11.2, spent its working life reading and writing files in server directories. It served plainly, close to the file system and without ceremony.
Its passage to Azure was blocked because Azure SQL Managed Instance cannot access file systems, network shares, or Windows folders. BULK INSERT and OPENROWSET instead require a data source pointing to Azure Blob Storage, leaving UTL_FILE without its customary surroundings.
It is survived by Azure SQL Managed Instance, only by workaround. Reads move to Blob Storage, bulk writes may use CREATE EXTERNAL TABLE AS SELECT, and record-by-record writing passes to Azure Functions fed by the database.
Survived by
Azure SQL Managed Instance workaround effort L
UTL_FILE reads and writes files in server directories; Managed Instance cannot reach any file system, network share or xp_cmdshell. Reads become BULK INSERT or OPENROWSET from Blob Storage, bulk writes can use CREATE EXTERNAL TABLE AS SELECT to Blob or Data Lake Storage, and record-by-record file writing moves to Azure Functions fed by the database.
- Catalogue UTL_FILE callers and the directories they use (DBA_DIRECTORIES).
- For file ingestion, land files in Blob Storage and read them with OPENROWSET(BULK) through an external data source.
- For exports, use CETAS to Parquet or CSV, or an Azure Function that queries the database and writes the file.
- Replace interactive file parsing loops in PL/SQL with application code.
Complications
Notices of correction
- oracle UTL_FILE (PL/SQL Packages and Types Reference 19c) · PL/SQL Packages and Types Reference 19c · read 2026-09-26
- oracle Initialization Parameter Changes in Oracle Database 18c · Upgrade Guide 18c, E88788-13, Dec 2021 · read 2026-09-26
- microsoft T-SQL differences between SQL Server and Azure SQL Managed Instance · page updated 2026-09-09 · read 2026-09-26
- microsoft Bulk access to data in Azure Blob Storage (BULK INSERT and OPENROWSET) · page updated 2025-02-27 · read 2026-09-26
- microsoft Azure Functions overview · page updated 2026-09-21 · read 2026-09-26