Re: Problem loading data - 9.21.FC4
Posted in 2004
Topics: Server Administration
Hi,
Try to let me know what kind of program you are using to do it !!
The plataform and IDS version could help ......
I couldn't understand if you are reading from one database, and
inserting in the table of another database.... in the same instance ??
Keep in touch ..... best regards RFo
"Howard Jones" <howie_lfc@hotmail.com> wrote in message news:<Q9sPb.21905$OA3.6983796@newsfep2-win.server.ntli.net>...
> Hello all,
>
> Informix Version 9.21.FC4
> OS HPUX 11.0
>
> I am attempting to load a bunch of tables into a new database using
> dbaccess.
> I am having problems with one particular table which appears to hang.
>
> I am guessing it has something to do with the "wait (netnorm)" which is
> output using onstat -g (session id)
>
> The output form onstat -g ses is as follows:
>
> Informix Dynamic Server 2000 Version 9.21.FC4 -- On-Line -- Up 2 days
> 12:59:59 -- 4956180 Kbytes
>
> session
> #RSAM total used
> id user tty pid hostname
> threads memory memory
> 100124 informix - 16732 sleepy 1
> 61440 56240
>
> tid name rstcb flags
> curstk status
> 100764 sqlexec c0000000c4845028 Y--P--- 33056
> c0000000c4845028cond wait(netnorm)
>
> Memory pools count 1
> name class addr
> totalsize freesize #allocfrag #freefrag
> 100124 V c0000000c549c040 61440 5200
> 106 6
>
> name free used name free
> used
> overhead 0 3256 scb 0
> 144
> opentable 0 3608 filetable 0
> 1040
> log 0 2168 temprec 0
> 1656
> keys 0 176 ralloc 0
> 14728
> gentcb 0 1720 ostcb 0
> 3416
> sqscb 0 16880 sql 0
> 72
> rdahead 0 256 hashfiletab 0
> 552
> osenv 0 2536 sqtcb 0
> 3144
> fragman 0 888
>
> Sess SQL Current Iso Lock
> SQL ISAM F.E.
> Id Stmt type Database Lvl Mode
> ERR ERR Vers
> 100124 INSERT arcdb CR Not Wait 0
> 0 9.03
>
> Current statement name : inscur
>
> Current SQL statement :
> INSERT INTO tdmsma608500 values(?,?,?,?,?)>
> Last parsed SQL statement :
> INSERT INTO tdmsma608500 values(?,?,?,?,?)>
>
>
>
> Any ideas why it is hanging?
> Cheers,
>
> Howard
Platform - Informix Version 9.21.FC4
Operating System - HPUX 11.0
There is a premium on space for the table unloads so I am compressing them.
The script I am using is below this works on many tables both smaller and
larger than the "problem" table.
What I am doing is unloading all the tables within a dbspace editing the
dbschemas to reference the new database/dbspace location
dropping the excisting table then recreating and loading it into the new
database ( which is within the same instance ).
Unload script.....
#!/bin/sh
TEMPUNL=/tsadm/informix/reorg/archive/squeeze
TEMPDIR=/tsadm/informix/reorg/archive
LOGFILE=$TEMPDIR/logs/unload.sh_`date +%T`.log
DEFRAGLIST=$TEMPDIR/defrag_list
DB=baan
INFORMIXDIR=/home/informix
UNLOADDIR=$TEMPUNL/unloads
[ -f $TEMPDIR/Finished ] && rm $TEMPDIR/Finished
sleep 5
clear
cat /dev/null > $LOGFILE
date
echo `date` >> $LOGFILE
while read TABNAME
do
echo "Unloading ${DB}:${TABNAME}; \\c" >>${LOGFILE}
echo "Unloading ${TABNAME}; \\c"
dd if=${TEMPUNL} | compress | dd
of=/var/adm/crash/reorg/archive/unloads/${TABNAME}.unl.Z &
sleep 2
${INFORMIXDIR}/bin/dbaccess ${DB} << EOF 2>>$LOGFILE
UNLOAD TO ${TEMPUNL} SELECT * FROM ${TABNAME} ;
EOF
echo "DONE" >>${LOGFILE}
echo "DONE"
date
echo `date` >> $LOGFILE
done < ${DEFRAGLIST}
touch Finished
echo " "
Load script.....
#!/bin/ksh
#
TEMPUNL=/tsadm/informix/reorg/archive/squeeze
TEMPDIR=/tsadm/informix/reorg/archive
LOGFILE=$TEMPDIR/logs/$0.`date +%T`.log
DEFRAGLIST=$TEMPDIR/defrag_list
INFORMIXDIR=/home/informix
UNLOADS=/var/adm/crash/reorg/archive/unloads
DB=arcdb
[ -f $TEMPDIR/Finished ] && rm $TEMPDIR/Finished
sleep 5
clear
cat /dev/null > $LOGFILE
date
echo `date` >> $LOGFILE
while read TABNAME
do
echo "Loading data for ${DB}:${TABNAME}; \\c" >>${LOGFILE}
echo "Loading data for ${DB}:${TABNAME}; \\c"
dd if=$UNLOADS/$TABNAME.unl.Z | uncompress | dd of=$TEMPUNL &
sleep 3
$INFORMIXDIR/bin/dbaccess ${DB} <<EOF 2>>$LOGFILE
LOAD FROM ${TEMPUNL} INSERT INTO ${TABNAME};
EOF
echo "DONE" >>$LOGFILE
echo "DONE"
date
echo `date` >> $LOGFILE
done < ${DEFRAGLIST}
touch Finished
"Ferronato" <roeferr@ig.com.br> wrote in message
news:df1bdeb4.0401231004.612c801a@posting.google.com...
> Hi,
>
> Try to let me know what kind of program you are using to do it !!
> The plataform and IDS version could help ......
>
> I couldn't understand if you are reading from one database, and
> inserting in the table of another database.... in the same instance ??
>
> Keep in touch ..... best regards RFo
>
> "Howard Jones" <howie_lfc@hotmail.com> wrote in message
news:<Q9sPb.21905$OA3.6983796@newsfep2-win.server.ntli.net>...
> > Hello all,
> >
> > Informix Version 9.21.FC4
> > OS HPUX 11.0
> >
> > I am attempting to load a bunch of tables into a new database using
> > dbaccess.
> > I am having problems with one particular table which appears to hang.
> >
> > I am guessing it has something to do with the "wait (netnorm)" which is
> > output using onstat -g (session id)
> >
> > The output form onstat -g ses is as follows:
> >
> > Informix Dynamic Server 2000 Version 9.21.FC4 -- On-Line -- Up 2 days
> > 12:59:59 -- 4956180 Kbytes
> >
> > session
> > #RSAM total used
> > id user tty pid hostname
> > threads memory memory
> > 100124 informix - 16732 sleepy 1
> > 61440 56240
> >
> > tid name rstcb flags
> > curstk status
> > 100764 sqlexec c0000000c4845028 Y--P--- 33056
> > c0000000c4845028cond wait(netnorm)
> >
> > Memory pools count 1
> > name class addr
> > totalsize freesize #allocfrag #freefrag
> > 100124 V c0000000c549c040 61440
5200
> > 106 6
> >
> > name free used name free
> > used
> > overhead 0 3256 scb 0
> > 144
> > opentable 0 3608 filetable 0
> > 1040
> > log 0 2168 temprec 0
> > 1656
> > keys 0 176 ralloc
0
> > 14728
> > gentcb 0 1720 ostcb 0
> > 3416
> > sqscb 0 16880 sql 0
> > 72
> > rdahead 0 256 hashfiletab 0
> > 552
> > osenv 0 2536 sqtcb 0
> > 3144
> > fragman 0 888
> >
> > Sess SQL Current Iso Lock
> > SQL ISAM F.E.
> > Id Stmt type Database Lvl Mode
> > ERR ERR Vers
> > 100124 INSERT arcdb CR Not Wait
0
> > 0 9.03
> >
> > Current statement name : inscur
> >
> > Current SQL statement :
> > INSERT INTO tdmsma608500 values(?,?,?,?,?)> >
> > Last parsed SQL statement :
> > INSERT INTO tdmsma608500 values(?,?,?,?,?)> >
> >
> >
> >
> > Any ideas why it is hanging?
> > Cheers,
> >
> > Howard
Related threads
- Posting from the Informix-list
- Migrating from IDS 9.40.UC6 to 11.50.UC3
- Ip for a network session
- questions onstat -g