I have been working on a project to password protect the file generated by Oracle Forms and Reports. Since this will only be for internal users, I am relying on PDFUSER, PDFOWNER by Oracle.
Now my next task is to password protect the files generated by UTL_FILE. I tried below to achieve this
=======================================
BEGIN
dbms_scheduler.create_job(
job_name => 'TEST_PASS_ZIP',
job_type => 'EXECUTABLE',
job_action => '/bin/sh',
number_of_arguments => 1,
enabled => FALSE -- Test run only
);
dbms_scheduler.set_job_argument_value(
job_name => 'TEST_PASS_ZIP',
argument_position => 1,
argument_value => 'zip -P MySecret123 /win/Class2/SysGenRpt/FIN/testfile_password.zip /win/Class2/SysGenRpt/FIN/testfile_password.txt'
);
dbms_scheduler.enable('TEST_PASS_ZIP');
END;
/
However, this approach was discarded by management as this is time consuming and can cause significant performance issues.
I need advise from PL/SQL SMEs, how can I generate a password protected file from UTL_FILE, which user can open directly using password and there's no need to de-crypt it. I found DBMS_CRYPTO, but I will have to encrypt and user will have to decrypt.