-23101 Unable to load locale categories

Linux系統下執行.sh文件時,出現以下錯誤:

-23101 Unable to load locale categories

腳本文件功能:unload備份數據.

unload.sh

INFORMIXDIR=/u/inf7.3;export INFORMIXDIR
PATH=$INFORMIXDIR/bin:$PATH;export PATH
INFORMIXSERVER=on_tcp190;export INFORMIXSERVER
ONCONFIG=onconfig.oth;export ONCONFIG
DB_LOCALE=zh_tw.big5;export DB_LOCALE
CLIENT_LOCALE=zh_tw.big5;export CLIENT_LOCALE
SERVER_LOCALE=zh_tw.big5;export SERVER_LOCALE
DBDATE=Y4MD0;export DBDATE
DBCENTURY=C;export DBCENTURY
DBDELIMITER=^A;export DBDELIMITER
PS1=`hostname`'$';export PS1

#############################################################
echo "begin_dbaflag  `date +%Y-%m-%d`  `date +%H:%M:%S`"
cd /exp/backup/backupdata
day=`date +%w`
rm -rf xa*

dbaccess sysmaster select name from sysdatabases where name not like "sys%"
and name not like "%_bak" and name not like "%_rep"
!

sed 's/|//g' db.txt > db1.txt
cat db1.txt > db.txt
rm -rf db1.txt

if [ -d $day ]
then
rm -rf $day
fi
mkdir $day

cat db.txt |split -l  $PER
ls xa* > tab
cat tab|while read line
do
   sh unload1.sh $line > $line.log  2>&1  &
done
rm -rf tab
echo "end_dbaflag  `date +%Y-%m-%d`  `date +%H:%M:%S`"

分析出錯的原因:腳本中和DB有關的變量有誤造成的。所以我們在撰寫這樣的腳本時一定要使sh文件中的變量同功能帳號下.profile中相應變量保持一致!

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7836221/viewspace-600784/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/7836221/viewspace-600784/

你可能感兴趣的:(-23101 Unable to load locale categories)