Sneh D wrote:
Hi all,
I need a method to do the following process. a) I am populting a table in my database (which is on Oracle 9.0 on RHEL) using a.DAT file. This .DAT file is received by an FTP on my server and a scheduler program starts populating my table as soon as the file is received.
b) One process on SERVER A FTPes the .DAT file on SERVER B. As soon as the FTP Process creates an image of the file on the destination server B, the process of server B is triggered while the FTP is taking place.
c) Since the correct number of records are not recieved in the file in SERVER B the process in SERVER B abandones itself and the table is not properly populated.
Is there a way in which i can find out (using a shell script) whether the .DAT file has been locked for FTP or not?
Why don't you make the insert/upload process wait for another file called "filename.over" (say)? You can send the original file first & then send this zero byte indicator file. I presume that you are using a shell script/sqlloader sort of setup & checking for file presence to accomplish your task.
Of course this is just guessing. Provide some more details about your setup. -- Soumen Dass [Registered Linux User # 272639 - Linux nova 2.4.22-1.2115.nptl i686]
An algorithm must be seen to be believed. -- D.E. Knuth