Home>Question Details



Bill -- Thanks for the question regarding "Follow-up RE: Directory List including modify date and times", version 9.2.0

Submitted on 15-Jul-2009 18:54 Central time zone
Last updated 16-Jul-2009 17:53

You Asked

I have read the Directory List including modify date and times - casting the date problem", version 8.1.7 thread...
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:7506780031005


If using the Oracle Directory Object with UTL_FILE and/or External Tables to interface with other applications, I also need to know modify date/times for those files.

UTL_FILE.FGETATTR does not return this attribute, so I am interested in the retrieve list of files approach. Since the solution I have seen involves using Java scripts that use implicit directory path rather than the Directory Object, my follow-up question is:

Can Java scripts also use the Directory Object so that the implicit directory path can remain abstracted and require only the Directory Object (and privilidges to) be maintained?

and we said...

You could pass the directory object name to the java routine and it could query the dictionary to get the path name.

I would suggest that, as it 'protects' you in the event the directory paths have to be updated.
Reviews    
4 stars CLARIFICATION   July 16, 2009 - 1pm Central time zone
Reviewer: Bill Reynolds from Diboll, TX
Thank you for your reply.

It seems obvious now you have given it. This allows the Java script to populate the temporary table regardless of the path the Directory Object points to.

However, if the Directory Object's path is modified, the Java java.io.FilePermission for the schema (which makes it's own implicit reference to the path) must also be modified.

Unless the schema running the Java script is assigned the JAVA_ADMIN role (which does not seem reasonable to me), the Java script can not dynamically assign the permission it needs (in event the path is modified).

I had hoped that the Directory Object could be sole source for both the path and it's permissions and let everything else remain abstracted.

If the Directory Object path/permissions and Java path/permissions must be independently assigned, I can live with this limitation.

Please advise, and thanks in advance!


Followup   July 16, 2009 - 5pm Central time zone:

The java code cannot work directly with the "directory object" to read the directly listing (if it could, then plsql could - because that would mean it was a builtin capability). The java code must use just "plain old directories".


You would not want to something to "self assign" privileges, I agree with y ou.

You will have to maintain the permissions independently.
4 stars THANKS   July 16, 2009 - 6pm Central time zone
Reviewer: Bill Reynolds from Diboll, TX
Understood.  Thanks for your time and have a nice day.





All information and materials provided here are provided "as-is"; Oracle disclaims all express and implied warranties, including, the implied warranties of merchantability or fitness for a particular use. Oracle shall not be liable for any damages, including, direct, indirect, incidental, special or consequential damages for loss of profits, revenue, data or data use, incurred by you or any third party in connection with the use of this information or these materials.

About Oracle | Legal Notices and Terms of Use | Privacy Statement