Link to home
Start Free TrialLog in
Avatar of sachin_dba
sachin_dbaFlag for India

asked on

Unix file creation date from Oracle

There are few csv files on OS which we are using in external tables. Can I get the time of creation/modify from Oracle prompt.

Cheers
Sachin
Avatar of Sean Stuber
Sean Stuber

Not by any sql or pl/sql means.

If you have a java stored procedure (you would have to write one) you could potentially do it but then you would also need to grant java permissions on that directory to read the files as well as execute permission on the java procedure and a pl/sql wrapper for the java routine
an easy substitute would be to set up a cron job to send "ls -alF" (or whatever options you want) output to a file periodically and then use an external table to read that.  The cron job can't have granularity lower than one minute though.
You can get the created time for the Oracle table definition from dba_objects.
No, dba_objects will only show you the date the external table object was created or modified.  It does not show any information about the underlying file
ASKER CERTIFIED SOLUTION
Avatar of MrNed
MrNed
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
yes, I agree,

 maybe I misunderstood the question, but I thought the question was referring to the create/modify time of the file not the table.
Avatar of sachin_dba

ASKER

thanks
how does   http:#35161152   answer the question?