Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with programming this process

Status
Not open for further replies.

EdRev

Programmer
Aug 29, 2000
510
US
I am very new with UNIX shell programming and I need help creating and scheduling this process.

We have a web application and on Mondays, we let our admin users execute an Oracle stored proc that will create files in the UNIX box.

What I need to do is by the end of the day (around 6 pm), I need to schedule a job in UNIX that will evaluate if the file(s) has been created, FTP it to the another system and then deletes the file(s). I need to loop this job for an hour to give the user a chance to make any required changes to the files.

I already have the FTP part covered, I just need to incorporate it to the batch job.

About deleting the files, the files are created under the Oracle dba user, such that I won't we able to delete them under my user id . What kind of UNIX user (superuser?) should I be in order to delete these files?

Any help will be greatly appreciated.

 
I solved this kind of issue the following way but it only works if the stored procedure is launched from unix.

A unix shell script is used to start the stored procedure using sqlplus. Before starting sqlplus , perform a umask 000 this way you will override the limitations for writing the file by Oracle.

without umask set to 000
e.g.: -rw-r----- oracle dba

with: umask set to 000
e.g.: -rw-rw-r-- oracle dba

Hope this will help you.

Philippe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top