Files are an integral part of modern database applications. You can keep files synched with the relational data stored in the database, by storing business data files in the database. You also get transactional consistency, unified security, backup, and search.

Oracle Database File System (DBFS) provides file system interface to files stored in the database tables. DBFS enables existing file based tools to access database files through familiar pathnames, directories, and links. Files in DBFS are either kept in a dedicated file store , or existing application tables.

DBFS provides unified data and file backups, Disaster Recovery, and management of both relational data as well as files. DBFS also add advanced features of compression, deduplication and encryption to files.

The DBFS Content Store allows each database user to create one or more file systems that can be mounted by clients. Each file system has its own dedicated tables that hold the file system content. The DBFS Content API is the PL/SQL interface in the Oracle RDBMS

How it works?

DBFS is a shared file system like NFS and consists of a server (Oracle Database) and a client (dbfs_client in Linux or internal DB client). The dbfs_client provides a command interface to allow files to be easily copied in and out of the database from any host on the network. On Linux platforms the dbfs_client can be used to mount the database file system on a regular mount point. This is done using the “Filesystem in Userspace” (FUSE) module. This allows Linux machines to access DBFS like any other physical file system.

Application makes file calls. Linux FUSE module receives these calls, and forwards them on to the dbfs_client exectutable. DBFS_client makes remote calls to DBFS content store in the database. DBFS_client makes OCI, LOB and SQL calls to database.

High Availability

DBFS Linux client offers HA by leverging RAC technology. The failure of a database instance is detected based on FAN notification. You will have to configure an extra service for failover. dbfs_client transparently redirects file acces to surviving RAC instances on node failures. Any outstanding transaction is replayed to surviving RAC instance.

DBFS Limitations

  • does not support aync IOs.
  • cannot be used when database is NOT running.
  • DBFS does not support exporting NFS exports.
Related Links

Advertisements