[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

sqlloader failure with unique constraint

Asked by sairamb1970 in Unix Systems Programming

Hi,

I am running the below script from unix and the sqlloader command fails, Can I request to let me know how to handle this error.
My Code:
sqlldr userid="$1" control=Control/$l_control.control.txt data="$2/$p.txt" log=log/$v_log.log bad=log/$v_log.bad silent=header,feedback

     retcode=`echo $?`
     echo $retcode
        case "$retcode" in
          0) echo "SQL*Loader execution successful" ;;
          1) echo "SQL*Loader execution exited with EX_FAIL, see logfile" ;;
          2) echo "SQL*Loader exectuion exited with EX_WARN, see logfile" ;;
          52) echo "SQL*Loader Discarding some rows, but I do not care " ;;
          3) echo "SQL*Loader execution encountered a fatal error" ;;
          *) echo "unknown return code";;
           esac
echo "Data Load Completed successfully for " $t $p

But still I am unable to handle the below error, I need to ignore any bad records and progress further. Please suggest

Record 1872: Rejected - Error on table DWDM_SUBRACK.
ORA-00001: unique constraint (T2100.DWDM_SUBRACK_PK) violated
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
My Code: 
sqlldr userid="$1" control=Control/$l_control.control.txt data="$2/$p.txt" log=log/$v_log.log bad=log/$v_log.bad silent=header,feedback
 
     retcode=`echo $?`
     echo $retcode
        case "$retcode" in
          0) echo "SQL*Loader execution successful" ;;
          1) echo "SQL*Loader execution exited with EX_FAIL, see logfile" ;;
          2) echo "SQL*Loader exectuion exited with EX_WARN, see logfile" ;;
          52) echo "SQL*Loader Discarding some rows, but I do not care " ;;
          3) echo "SQL*Loader execution encountered a fatal error" ;;
          *) echo "unknown return code";;
           esac
echo "Data Load Completed successfully for " $t $p
[+][-]10/28/09 06:46 AM, ID: 25683143Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/28/09 06:49 AM, ID: 25683174Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/28/09 07:01 AM, ID: 25683288Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/02/09 08:38 AM, ID: 25720909Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/02/09 08:48 AM, ID: 25721027Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/02/09 09:10 AM, ID: 25721244Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625