Implementing the Oracle Database File System
The Oracle Database File System (DBFS), included with Oracle Database 11g Enterprise Edition, creates a standard file system interface on top of files and directories that are stored in database tables. DBFS is similar to NFS in that it provides a shared network file system that looks like a local file system. Like NFS, there is a server component and a client component. If you use Oracle DBFS at your site, PeopleTools provides the infrastructure to use DBFS as the Report Repository with your PeopleSoft system.
For detailed information about Oracle DBFS and its architecture, see the Oracle DBFS documentation in Oracle® Database SecureFiles and Large Objects Developer's Guide 11g Release 2 (11.2).
The following requirements must be met to implement Oracle DBFS on your PeopleSoft system.
The dbfs_client host must have the Oracle client libraries installed.
The dbfs_client can be used as a mount client only on Linux and Linux.X64 platforms.
The dbfs_client host must have the kernel-devel package installed to configure and build FUSE.
The dbfs_client host must have the FUSE Linux package installed.
A group named fuse must be created and the user name that is running the dbfs_client must be a member of the fuse group.
Please note the following DBFS limitations:
DBFS supports most file system operations with the exception of: ioctl, locking, asynchronous I/O through libaio, O_DIRECT file opens, hard links, pipes, and other special file modes.
Memory-mapped files are supported except in shared-writable mode.
For performance reasons, DBFS does not update the file access time every time file data or its attributes are read.
You cannot run programs from a DBFS-mounted file system if the direct_io option is specified.
Like any shared file system, the performance of DBFS for small files lags the performance of a local file system. Each file data or metadata operation in DBFS must go through the FUSE user mode file system, and then be forwarded across the network to the database. Therefore, each operation that is not cached on the client takes a few milliseconds to run in DBFS. For operations that involve an input/output (IO) to disk, the time delay overhead is masked by the wait for the disk IO. Naturally, larger IOs have a lower percentage overhead than smaller IOs. The network overhead is more noticeable for operations that do not issue a disk IO. When you compare the operations on a few small files with a local file system, the overhead is not noticeable, but operations that affect thousands of small files incur a much more noticeable overhead. For example, listing a single directory or looking at a single file produce near instantaneous response, while searching across a directory tree with many thousands of files results in a larger relative overhead.
Oracle DBFS must be licensed, installed, and enabled before you can set up your PeopleSoft system to take advantage of this feature. For detailed information about installing DBFS, see Installing DBFS in Oracle® Database SecureFiles and Large Objects Developer's Guide 11g Release 2 (11.2)
The following configuration is required to implement DBFS:
The DBFS Report Repository must be on a mounted Linux File System.
The PeopleSoft Webserver must be installed on Linux.
The PeopleSoft Application Server and the PeopleSoft Database can be installed on any other supported system (Windows/Unix/Linux).
To implement DBFS on your PeopleSoft system, complete the following steps:
Using SQLPlus, connect as SYSDBA and grant permission for the creation of secure files.
SQL> show parameter db_securefile NAME TYPE VALUE \-----------------------\ ----------------- \-------------\ db_securefile string PERMITTED
Using SQLPlus, connect as SYSDBA and grant the DBFS role to ACCESSID.
SQL> grant dbfs_role to SYSADM;
Using SQLPlus, connect as ACCESSID and create the tablespace for the DBFS Report Repository.
SQL> connect SYSADM/SYSADM SQL> create tablespace dbfs_tbs datafile 'd:\orattach\oradata\Pt852GA\dbfs_tbs1.dbf' size 500M reuse autoextend on next 200M segment space management auto; Tablespace created.
For Oracle 12c only, using SQLPlus, connect as SYSDBA and grant unlimited quota to the DBFS Report Repository tablespace for ACCESSID.
SQL> alter user SYSADM quota unlimited on dbfs_tbs;
Using SQLPlus, connect as ACCESSID and create, register, mount, and set read/write access for the DBFS Report Repository.
SQL> connect SYSADM/SYSADM CREATE FILESYSTEM REPORT REPOSITORY: SQL> @D:\oracle\product\11.2.0\dbhome_1\RDBMS\ADMIN\dbfs_create_filesystem.sql dbfs_tbs ReportRepository No errors. \-------\ CREATE STORE: begin dbms_dbfs_sfs.createFilesystem(store_name => 'FS_REPORTREPOSITORY', tbl_name => 'T_REPORTREPOSITORY', tbl_tbs => 'dbfs_tbs', lob_tbs => 'dbfs_tbs', do_partition => false, partition_key => 1, do_compress => false, compression => '', do_dedup => false, do_encrypt => false); end; \-------\ REGISTER STORE: begin dbms_dbfs_content.registerStore(store_name=> 'FS_REPORTREPOSITORY', provider_name => 'sample1', provider_package => 'dbms_dbfs_sfs'); end; \-------\ MOUNT STORE: begin dbms_dbfs_content.mountStore(store_name=>'FS_REPORTREPOSITORY', store_mount=>'ReportRepository'); end; \-------\ CHMOD STORE: declare m integer; begin m := dbms_fuse.fs_chmod('/ReportRepository', 16895); end; No errors.
Mount the DBFS Report Repository using the DBFS Client on Linux.
[oracle@<hostname>]$export LD_LIBRARY_PATH=/products/oracle/11.2.0/dbhome_1/lib:/usr/lib [oracle@<hostname>]$mount [oracle@<hostname>]$echo "SYSADM" > dbfspassword [oracle@<hostname>]$nohup dbfs_client SYSADM@PT852GA /mnt/dbfs < dbfspassword & [oracle@<hostname>]$mount dbfs on /mnt/dbfs type fuse (rw,nosuid,nodev,max_read=1048576,default_permissions,user=oracle)
Use the mount point /mnt/dbfs/ReportRepository as the Report Repository location while configuring the PeopleSoft Web Server Domain.
You can specify the location for the Report Repository Path on the General page of the Web Profile during installation.
See the product documentation for PeopleSoft 9.2 Application Installation for Oracle for information on installing the PeopleSoft Pure Internet Architecture, setting up the Report Repository, and defining ReportRepositoryPath.
See the product documentation for PeopleTools: Process Scheduler for more information about Creating Server Definitions.
Using Advanced DBFS Features
Advanced features, including encryption and compression, are available by using Oracle Wallet with Oracle DBFS. To use these advanced features, complete the following steps:
Create the Oracle Wallet.
In $TNS_ADMIN/sqlnet.ora add the following entry:
ENCRYPTION_WALLET_LOCATION= (SOURCE=(METHOD=FILE)(METHOD_DATA= (DIRECTORY=$HOME/wallet)))
Open the Wallet; the Wallet needs to be opened to access the Report Repository.
SQL> conn / as sysdba SQL> alter system set encryption wallet open identified by "oracle"; System altered.
Create the Advanced DBFS Filesystem with Compress Type as "Medium”, Encrypted.
SQL> conn SYSADM/SYSADM SQL> @$ORACLE_HOME/rdbms/admin/dbfs_create_filesystem_advanced dbfs_tbs ReportRepository_Encrypt compress-medium nodeduplicate encrypt partition No errors. \-------\- CREATE STORE: begin dbms_dbfs_sfs.createFilesystem(store_name => 'FS_REPORTREPOSITORY_ENCRYPT', tbl_name => 'T_REPORTREPOSITORY_ENCRYPT', tbl_tbs => 'dbfs_tbs', lob_tbs => 'dbfs_tbs', do_partition => true, partition_key => 1, do_compress => true, compression => 'medium', do_dedup => false, do_encrypt => true); end; \-------\- REGISTER STORE: begin dbms_dbfs_content.registerStore(store_name=> 'FS_REPORTREPOSITORY_ENCRYPT', provider_name => 'sample1', provider_package => 'dbms_dbfs_sfs'); end; \-------\- MOUNT STORE: begin dbms_dbfs_content.mountStore(store_name=>'FS_REPORTREPOSITORY_ENCRYPT', store_mount=>'ReportRepository_Encrypt'); end; \-------\- CHMOD STORE: declare m integer; begin m := dbms_fuse.fs_chmod('/ReportRepository_Encrypt', 16895); end; No errors.
Mount the DBFS Filesystem ReportRepository_Encrypt using dbfs_client. For example:
nohup dbfs_client SYSADM@F8538011 /mnt/dbfs < dbfspassword &
Check if the DBFS Filesystem is mounted. For example:
dbfs on /mnt/dbfs type fuse (rw,nosuid,nodev,max_read=1048576,default_permissions,user=oracle) /mnt/dbfs/ReportRepository_Encrypt
Use the mount point /mnt/dbfs/ReportRepository_Encrypt as the Report Repository location while configuring the Web Server Domain.