Solved

Unix file creation date from Oracle

Posted on 2011-03-16
8
479 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
run a PARFILE from a Windows Scheduled task - Oracle export 5 41
case statement in where clause 5 40
selective queries 7 21
Use of Exception to end a Loop 3 14
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows how to recover a database from a user managed backup
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

912 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

16 Experts available now in Live!

Get 1:1 Help Now