Solved

Unix file creation date from Oracle

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

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 74

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 74

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 74

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 74

Expert Comment

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

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
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…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.

856 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