Skip to content

Latest commit

 

History

History
25 lines (23 loc) · 1.1 KB

File metadata and controls

25 lines (23 loc) · 1.1 KB

Manipulate windows explorer functions through oracle database

Interaction with windows explorer through the oracle database. It is possible to create folders, move and rename files from shared directories.

1 - Adjust the DOMAIN, USER and PASSWORD variables (Project java, class Function.java);
2 - Compile project;

3 - Import the compiled class "Funcion.class" and the jcifs.jar library into the oracle database (oracle user needs grant dba);
4 - Create the objects (util.pck) by running file script.sql;
5 - Grant permission to the current schema by running the command "exec dbms_java.grant_permission( 'YourUserOracle', 'SYS:java.net.NetPermission', 'specifyStreamHandler', '' )".

Command example:
exec util_pck.explorer_create_folder('\\srv-fs\dados\teste');
exec util_pck.explorer_rename_file('\\srv-fs\dados\teste\teste.txt', 'testenew.txt');
exec util_pck.explorer_move_file('\\srv-fs\dados\teste\teste.txt', '\\srv-fs\dados\teste\newdir');
exec util_pck.explorer_copy_file('\\srv-fs\dados\teste\teste.txt', '\\srv-fs\dados\teste\newdir');