Solved

Unix file creation date from Oracle

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
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.

808 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