Solved

Unix file creation date from Oracle

Posted on 2011-03-16
8
488 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
upgrading Oracle 10g/ 11g / 11g R2 to Oracle 12c 25 89
Sybase and replication server 13 58
oracle sqlplus query delimiter 8 37
MS SQL Server Management Studio R2 4 32
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 post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

749 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