Solved

Unix file creation date from Oracle

Posted on 2011-03-16
8
478 Views
Last Modified: 2013-12-19
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
0
Comment
Question by:sachin_dba
  • 5
  • 2
8 Comments
 
LVL 73

Expert Comment

by:sdstuber
ID: 35154058
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
0
 
LVL 73

Expert Comment

by:sdstuber
ID: 35154065
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.
0
 
LVL 7

Expert Comment

by:MrNed
ID: 35154074
You can get the created time for the Oracle table definition from dba_objects.
0
 
LVL 73

Expert Comment

by:sdstuber
ID: 35158014
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
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 7

Accepted Solution

by:
MrNed earned 500 total points
ID: 35161152
@sdstuber - yes, hence the "Oracle table definition".
0
 
LVL 73

Expert Comment

by:sdstuber
ID: 35161507
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.
0
 

Author Closing Comment

by:sachin_dba
ID: 36095123
thanks
0
 
LVL 73

Expert Comment

by:sdstuber
ID: 36096536
how does   http:#35161152   answer the question?
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now