Home » Infrastructure » Unix » How to read sqlloader log files for rejected records
How to read sqlloader log files for rejected records [message #97692] Thu, 14 November 2002 15:24 Go to next message
Shelley
Messages: 2
Registered: November 2002
Junior Member
I am trying to make a utility that can read the sql loader log files , check if records got rejected ( if the number of records rejected is >0) , if yes then it should send an alert through mail.

The problem that I am having right now that how do I check in the log file that that the number of rejected records is zero?
Re: How to read sqlloader log files for rejected records [message #97693 is a reply to message #97692] Thu, 14 November 2002 15:41 Go to previous messageGo to next message
satish
Messages: 112
Registered: September 2000
Senior Member
Hi,
Use a shell script which first runs the sqlldr and afer running it use unix utility tr or perl to search for numberof records rejected in the log and if it finds use mailx to send the information to u.
Regards,
Satish.
Re: How to read sqlloader log files for rejected records [message #97741 is a reply to message #97692] Thu, 12 December 2002 12:39 Go to previous message
Sanjay
Messages: 236
Registered: July 2000
Senior Member
The BOTTOM 19 lines of the log file CLEARLY tells you how many rows got inserted and rejected and so on. You have it there so just do a 'grep' on the key work.

or do

tail -19 sqlloader.log | mailx ....

Example (bottom 19 lines)

443 Rows successfully loaded.
0 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.

Space allocated for bind array: 65016 bytes(63 rows)
Space allocated for memory besides bind array: 0 bytes

Total logical records skipped: 0
Total logical records read: 443
Total logical records rejected: 0
Total logical records discarded: 0

Run began on Tue Aug 20 15:00:57 2002
Run ended on Tue Aug 20 15:00:58 2002

Elapsed time was: 00:00:01.41
CPU time was: 00:00:00.04
Previous Topic: change sysdate to get date other than OS date
Next Topic: Help with appending files
Goto Forum:
  


Current Time: Fri Nov 29 15:25:02 CST 2024