Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

File Size using Oracle SQL !

S567Jun 10 2020 — edited Jun 11 2020

Hi Experts,

I work on oracle 11g..

I have a requirement, that I have file on Linux server in a physical location  on that Linux server, Oracle DB installed.Using Oracle how can I find out file size using script.

Let me know if any details still required.

I am using below script  which i got when i browsing..I have a file located at below path and file is CUSTOMER_20200605.csv when i executed the below i am getting error ...

SQL PLUS Command FAILED - not enough arguments

anonymous block completed

setserveroutput on;

DECLARE

v_fexists      BOOLEAN;

v_file_length  NUMBER;

v_block_size   BINARY_INTEGER;

BEGIN

  utl_file.fgetattr

     ('/usr/oracle/load/files', 'CUSTOMER_20200605.csv', v_fexists, v_file_length,  v_block_size);

  DBMS_OUTPUT.PUT_LINE (v_file_length);

END;

Thanks,

S

SQLPLUS command failed - not enough argumentsanonymous block completed

This post has been answered by Solomon Yakobson on Jun 10 2020
Jump to Answer
Comments
Post Details
Added on Jun 10 2020
5 comments
1,554 views