Like this: Like Loading Follow Following. Tidbytez Join 57 other followers. Sign me up. Collectives on Stack Overflow. Learn more. Asked 3 years, 4 months ago. Active 1 year, 4 months ago. Viewed 6k times. See asktom. Probably a duplicate of stackoverflow. It need to create a new table.
Could be posible without creating new table? It is complicated to create a solution and I don't have time to do it for you but I hope that there are enough breadcrumbs here that you or someone else could achieve it. This is the query that I need. Thank you for your answer. King Regards, Eko Indriyawan.
EXEC Master. January 22, at am September 20, at am Hello, Can one advise how to obtain file's details, please? Kind Regards. Yuan, March 14, - pm UTC. Greate work Tom! But the problem is that I have oracle 8. It would be really nice of you if you could give exactly the same solution for thanks. April 15, - am UTC. Your book is not available here hash, April 15, - pm UTC.
Sorry but your book is not available in Pakistan. It would cost me my one month salary. April 15, - pm UTC. Sure it is, I get the royalty statements. People in Pakistan have gotten it. Murtala, April 26, - pm UTC. April 27, - am UTC. And back then, we did it on paper typically, to learn how it was done.
Thanx alot 4 such solution. June 02, - pm UTC. A reader, June 16, - pm UTC. June 16, - pm UTC. Khozema, August 16, - pm UTC. Heres the cut and paste of the code create or replace and compile java source named "DirList" as import java. Was expecting: ";" I dont see anything wrong though.
Please help. August 17, - pm UTC. I just cut and pasted, you should do the same in sqlplus. I did cut and paste. And I got the error. And I have granted javauserpriv from system to apps user. Do I need to anything else.
A reader, August 18, - pm UTC. Heres what I found. Sqlplus 8. I downloaded 10i client from OTN. I am testing the script now, and looks like everything is working. Thanks a lot for lots of help and great job helping. Thanks Tom, once again you are the best. Sorry I won't be at the local meeting you are comming to present here soon CT , but many of my friends are going so I'll have one say hello for me. He said: "why are you guys putting code in our system that you can't write?
We said: "Tom Kyte wrote it from asktom". Kevin CT. How do I change this code to distinguish between directories and files or just ignore the directories when inserting it into the temp-table? October 06, - pm UTC. Rename a file daniel, December 02, - am UTC. Does anybody know how to rename a file on OS using java call from a database?
Not sure if it will work daniel, December 02, - pm UTC. I"m not sure if it would work I've done some more research on your site and came up with an aproach. Here is what I need to do. Then simply use the external table to load each row into a table holding the audit information. I'm open to any suguesstions. December 02, - pm UTC. I mean, you are trashing the audit logs in the file system? December 03, - am UTC.
I would be loading it into another database. We have a repository where we store all the sys. Now we are required to store the audit files from OS as well. I could write a scrip to do it, I would prefer not to We don't have a common transfer protocol I don't even have access to some of these servers So I wanted to see if doing it from inside of the database would be possible. At least I have control over that. December 03, - pm UTC.
I wasn't sure what kind of performance hit I could take if I had to alter the table I'll look closely into bfile concept December 04, - am UTC. Hello, in reference to the original question: Is it possible to do this in XE as it don't support Java? Regards Andre. June 22, - pm UTC. Alexander the ok, June 27, - pm UTC. Especially if say we where using windows with 9i? Thanks you.
June 27, - pm UTC. Are you sure about that? Could you tell me which subprogram it is? Tom: Does reading directory work with 8i database.
WHen I ran the java stored proedure it kept going. It worked fine in 9i. July 11, - pm UTC. July 17, - pm UTC. Those errors appear all the time after I execute thte procedure. Kin, July 17, - pm UTC. I don't know why July 18, - am UTC. Please utilize support for this one. I don't know what's missing. This code works on my machine, but when I run on another server , it fails.
This machine SO is a unix. It's my problems with permissions? I'm not a dba on the server should I ask the dba to grant me the privelegies? August 09, - pm UTC. MM' '. I believe that this object it's not point to the correct directory, because i'm not a dba of th DB.
I'm out of ideas The machine is a unix. Never code exception blocks like that - just a waste of keystrokes and only makes the errors "seem like they are not happening". Thanks for the help?? This was very helpful ,i was struggling to get to this, well lots of good stuff on your site.
Hi Tom Thanks for the java program for reading the directory, it works perfectly apart from the fact that we use Oracle dirs when accessing the filesystem. Mette, October 10, - am UTC. Hi again. I have added 2 new columns filelength, filetype and filemodified, but I dont have that much knowledge of java, so the date is annoying me: sorry for the weird tabs here - dont know how to remove them Cant decide elementtype for host element 4 java.
Date; import java. October 10, - pm UTC. I don't have that code at hand, the concept is here, a little digging around should turn up how to do that. When I tried to run your script on the very first followup of this thread, it said "Java not installed". Is there any way to run this on Oracle 10g XE. Thank you very much for the great idea regards Mette. Thank you very much for this update, Mette. Just a remark: compared to the original DirList procedure you now need read privilege on all the files in the directory and not only on the directory itself.
Regards Michel. Hi Tom Is it possible to read a network directory f. November 15, - am UTC. A reader, January 09, - am UTC. I am on 10g Thanks in advance, Denes Kubicek. January 11, - am UTC. A reader, January 14, - pm UTC. I found a mistake. Toad formating changed some capital letters into lower. Sorry for not seeing this.
Thanks again. Denes Kubicek. Why i am getting this? Sumanth, February 08, - am UTC. Hi Tom, Thanks for this excellent source. February 08, - am UTC. February 26, - pm UTC. How can I get cretaed date attribute of a file in that particular directory in Oracle and inserteing it into a table. February 27, - am UTC. I didn't either really, however, by searching around a bit - I was able to glue together the simple example. I'm sure if you looked into a little on your own, you would be able to figure out how to get the needed information from the Java APIs.
A reader, March 07, - pm UTC. March 07, - pm UTC. Was expecting one of: " sql" I cut and paste your code - failed I cut and paste my original code - success therefore, you have a cut and paste error somewhere, find it. Thanks Tom, that worked.
I have tried with both the inputs: 1. A reader, March 08, - am UTC. Tom, You are right, I am refering to a subdirectory. Is there a way to refer to a subdirectory of a remote server? Thanks for your help. March 08, - am UTC. And the subfolder has 10 files.
What is the mistake? March 08, - pm UTC. So, I've a feeling YOU have a directory by that name, but the server does not. Hi, I came here when I had the problem of reading a directory list under 8. For that, thanks Now I have to write the same thing against an XE database and this is killing me.
0コメント