Search notes:
KUP-04040: file … in … not found (Windows)
In Windows, when accessing an
external table, Oracle might throw the
KUP-04040: file … in … not found error message.
This error might be caused if the Oracle Service (process) doesn't have the necessary privileges to access the file.
The following
PowerShell script grants the necessary rights on a given file to the Services named
OracleServiceORA19:
$file = "$home/ext/file.csv"
$oracle_service_name = 'NT SERVICE\OracleServiceORA19'
$accessRule = new-object System.Security.AccessControl.FileSystemAccessRule `
'NT SERVICE\OracleServiceORA19' , `
([System.Security.AccessControl.FileSystemRights]::FullControl) , `
([System.Security.AccessControl.AccessControlType]::Allow)
$acl = get-acl $file
$acl.AddAccessRule($accessRule)
set-acl $file $acl