Skip to Main Content

Database 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!

loading data into staging table and then into target table using sql loader

774557May 21 2010 — edited May 22 2010
We have 7 fixed length files coming up which needs to be loaded to staging table and then to a target table (structure of the target table and staging table are same) individually one after other. Both staging table and target tables are Oracle tables residing on an AIX Server. We are using SQL Loader to load into staging table and then stored procedures to load from staging table into target table. If error occurs at any stage then a text file with the error records and error message should be generated with the name of the text file being same as the name of the source file and this should be done for each file separately. All the flow should be written using UNIX shell scripting.
Errors:
Only errors that should be taken care are
While loading into staging table – Format errors.
While loading from staging table to target table – Duplicates (Thinking of a stored procedure which uses inner join to find out the duplicates and write all those errors to a temp table and then to write a UNIX Shell Scripting which creates a text file from the temp table and clearing off the temp table)

I am trying to come up with a solution for the above situation but unfortunately couldn't as I am new to UNIX shell scripting. Any help would greatly be appreciated. Thank you!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 19 2010
Added on May 21 2010
2 comments
3,969 views