Thursday, April 9, 2020

How to test read/write permissions on UTL directory (in UNIX) from database or backend


Below is the sample script which can be run from TOAD/SQL*PLUS to test the read write permissions on UTL directory from database or backend
DECLARE
  l_file utl_file.file_type;
BEGIN
  l_file := utl_file.fopen( 'DBA_UTL_DIR_NAME', 'test_file_name.txt', 'W' );
  utl_file.put_line( l_file, 'Here is sample text' );
  utl_file.fclose( l_file );
END;
  • Direcory name (DBA_UTL_DIR_NAME) should exists in DBA_DIRECTORIES table
  • Make sure that the UTL_FILE directory path exists in UNIX
select * from DBA_DIRECTORIES where directory_name = 'DBA_UTL_DIR_NAME'

SQL Query to Find Oracle Web ADI Importer Package Procedure Name

 SELECT ba.attribute2     wed_adi_package_procedure_name   FROM apps.bne_attributes      ba,        apps.bne_param_lists_b   bplb,        ap...