Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Wrapper Unix script to load Data

nkandwalApr 30 2015 — edited May 6 2015

Hi UNIX Gurus I need help in setting up a CRON job AND creating a wrapper script for my Oracle loading and data message..Can some one please guide me to do the following 8 steps..your help will be truly appreciated

1. FTP the 4 files from or reference the 4 files from the location to which the files have

been pushed from - the location provided by new  system

2. check if there are 4 files if any one of them is empty then inform the new system with an

email and abort process.  I have named the files a.csv, b.csv,

c.csv, d.csv

3. check for the 4 file names as a/b/c/d respectively

4.  check if the file are not empty if any one of them is empty then inform the new system

with an email and abort process.

5. spawn a unix process for SQLPLUS with  userid connection

information and do the  following:

DO my oracle stuff

6. Close the SQL spawned process and get back to the parent  unix shell.

7. Once the data has been loaded we need to rename the files with time stamp and

archive them for 90 days.

8. We can delete these files once the time stamp goes beyond 90 days.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 3 2015
Added on Apr 30 2015
20 comments
3,312 views