Script To Check the File On Database Server(Unix) Using UTL_FILE
DECLARE
l_fexists BOOLEAN;
l_file_length NUMBER;
l_block_size NUMBER;
l_file_name VARCHAR2 (2000); -- Name if the file that needs to check on server
BEGIN
UTL_FILE.fgetattr ('/usr/tmp'
, l_file_name
, l_fexists
, l_file_length
, l_block_size
);
IF l_fexists
THEN
DBMS_OUTPUT.put_line ('The File exists');
ELSE
DBMS_OUTPUT.put_line ('The File dosent exists');
END IF;
END;
No comments:
Post a Comment