Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2010
    Posts
    5

    Unanswered: Inserting a large .log file in CLOB field of Oracle DB, giving exception ORA-01756

    Hi,

    I want to insert long .log file into CLOB field of Oracle DB. The Log file will increase its size dynamically.

    When i am trying to insert the file in CLOB i am getting ERROR:
    ORA-01756: quoted string not properly terminated.

    Please find below the code.
    myLogCount=$(cat $LogFile | wc -c)
    echo "myLogCount in Actual Program::::: $myLogCount"
    if [ $myLogCount -gt 32767 ]
    then
    awk '{n=n+length+1}
    n <= 32500
    n > 32500 {n-=length;print substr($0,1,(32500-n));exit}
    ' $LogFile > $myTmpLog

    echo "Log file too large to view, Please visit server to view complete log" >> $myTmpLog
    myTmpLogCount=$(cat $myTmpLog | wc -c)
    br_Update_Proxy_Job_Run_Status "$Comment" \
    "$RunStatusId" \
    "$WarningCount" \
    "" \
    "" \
    "" \
    "" \
    "" \
    "$RptTotalRejectedDF" \
    "$myTmpLog" \
    "$ProxyJobStatus"
    else
    br_Update_Proxy_Job_Run_Status "$Comment" \
    "$RunStatusId" \
    "$WarningCount" \
    "" \
    "" \
    "" \
    "" \
    "" \
    "$RptTotalRejectedDF" \
    "$LogFile" \
    "$ProxyJobStatus"
    fi

    Please help me with sample code or tell me where i am doing wrong.

    Thanks-
    Raj

  2. #2
    Join Date
    Sep 2009
    Location
    Ontario
    Posts
    1,057
    Provided Answers: 1
    Since half the variables in the script are not defined within the script, I would suggest first finding out what the actual value of those variables is.
    If one of them contains an embedded meta character then the script may fail.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •