Search notes:

ORA-22288: file or LOB operation … failed

Windows

Example for Windows with PowerShell.
'some text' > $home/file.txt
create directory tq84_dir as 'C:\Users\Rene';
The following PL/SQL block throws ORA-22288 …:
declare
   fil  bfile;
   res boolean;
begin
   fil := bfilename('TQ84_DIR', 'file.txt');

   dbms_output.put_line('file exists: ' || dbms_lob.fileexists(fil));

   dbms_lob.fileopen(fil);
-- Do some unspecified stuff.
   dbms_lob.fileclose(fil);

end;
/
We need to change the file's security descriptor and explicitly allow full control for the Oracle Service:
$acl = get-acl "$home/file.txt"

$accessRule = new-object System.Security.AccessControl.FileSystemAccessRule `
   'NT SERVICE\OracleServiceORA19'                                , `
  ([System.Security.AccessControl.FileSystemRights]::FullControl) , `
  ([System.Security.AccessControl.AccessControlType]::Allow)
  
$acl.AddAccessRule($accessRule)

set-acl "$home/file.txt" $acl
After adding this Access Rule to the Access Control List, the file can be accessed without ORA-22288.

See also

dbms_lob
Other Oracle error messages

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1745308441, '3.145.11.190', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/errors/ORA-22288_file-or-LOB-operation_failed/index(81): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78