Hi All,
I want to store 32KB of file in Oracle DB into CLOB field. I am not able to insert more than 32KB of file into CLOB. So i want to put a limit on the file size. I am using k shell.
My file size will dynamically increase its size, i want to check the file size if it is more than 32KB then put a limit and insert the same in CLOB field of DB.
I am using k-shell.
Please find below my code which is in place and let me know where i am doing wrong:
I am getting
ERROR:
ORA-01756: quoted string not properly terminated
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 appreciate if any sample script
Thanks,
Raj