Re: dbexport and dbimport problem .... help
Posted in 1999
Topics: Storage & Space Management, Server Administration, Migration, Import/Export & Data Conversion
Yes, it was done using a DBA privilege id. Some how the dbexport done was not complete. No error
messages were returned. Unless the dbexport was done to the hard disk, we could see the dbexport.out
file but now it is done to a tape device. We could not dbexport to hard disk since don't have
enough disk space to do so.
If the dbexport completed successfully, there should be a message "dbexport completed" at the end of
the dbexport process but in this case it stop somewhere during unload of one of the tables and then
the UNIX prompt came out with no indication of error.
Thank you for the first feedback. Please continue on helping me in this case.
regards.
Helmut Leininger <h.leininger@bull.at>@iiug.org on 27/10/99 02:30:56 PM
Please respond to h.leininger@bull.at
Sent by: owner-informix-list@iiug.org
To: informix-list@iiug.org
cc:
Subject: Re: dbexport and dbimport problem .... help
Ameerul@mesiniaga.com.my wrote:
> I'm using Informix Online on AIX. Have problem with dbexport to a 4mm tape (2Gb) and then dbimport
> back. Done dbexport with stated command :
> dbexport dbname -t /dev/rmt0 -b 16 -s 2048000
>
> When dbimport, it is not complete.
>
> dbimport dbname -t /dev/rmt0 -b 16 -s 2048000
>
> But some tables are missing. Thank God I have a backup.
>
> Tried again dbexport and dbimport, still same problem. Could anyone help me?
Hi,
I assume you ran the job with DBA privileges. Are there any massages in the logfiles of dbexport /
dbimport that indicate a problem?
Regards
--
Helmut Leininger
Bull AG / Vienna
Open Systems Support
Email: h.leininger@bull.at
helmut.leininger@bull.net
This opinion is mine and not necessarily that of my employer.
No guarantees whatsoever.
Ameerul@mesiniaga.com.my wrote:
> Yes, it was done using a DBA privilege id. Some how the dbexport done was not complete. No error
> messages were returned. Unless the dbexport was done to the hard disk, we could see the dbexport.out
> file but now it is done to a tape device. We could not dbexport to hard disk since don't have
> enough disk space to do so.
>
> If the dbexport completed successfully, there should be a message "dbexport completed" at the end of
> the dbexport process but in this case it stop somewhere during unload of one of the tables and then
> the UNIX prompt came out with no indication of error.
>
> Thank you for the first feedback. Please continue on helping me in this case.
>
> regards.
>
> Helmut Leininger <h.leininger@bull.at>@iiug.org on 27/10/99 02:30:56 PM
>
> Please respond to h.leininger@bull.at
>
> Sent by: owner-informix-list@iiug.org
>
> To: informix-list@iiug.org
> cc:
> Subject: Re: dbexport and dbimport problem .... help
>
> Ameerul@mesiniaga.com.my wrote:
>
> > I'm using Informix Online on AIX. Have problem with dbexport to a 4mm tape (2Gb) and then dbimport
> > back. Done dbexport with stated command :
> > dbexport dbname -t /dev/rmt0 -b 16 -s 2048000
> >
> > When dbimport, it is not complete.
> >
> > dbimport dbname -t /dev/rmt0 -b 16 -s 2048000
> >
> > But some tables are missing. Thank God I have a backup.
> >
> > Tried again dbexport and dbimport, still same problem. Could anyone help me?
>
> Hi,
>
> I assume you ran the job with DBA privileges. Are there any massages in the logfiles of dbexport /
> dbimport that indicate a problem?
>
> Regards
> --
> Helmut Leininger
>
> Bull AG / Vienna
> Open Systems Support
>
> Email: h.leininger@bull.at
> helmut.leininger@bull.net
>
> This opinion is mine and not necessarily that of my employer.
> No guarantees whatsoever.
Up to now I have no specific idea.
Did you look also into your Informix logfile (indicated by MSGPATH in your config file)?
I
My personal proceeding:
If I do a dbexport to tape I also specify the -f option to have the sql-file on disk. So, I have the
possibility to modify the sql-file for bypassing some problems during dbimport (I once came across some
record count mismatches). This probably will not correct yout problem or give additional information for
the moment because the output of dbexport.out and the sql-file should be rather the same.
Regards
--
Helmut Leininger
Bull AG / Vienna
Open Systems Support
Email: h.leininger@bull.at
helmut.leininger@bull.net
This opinion is mine and not necessarily that of my employer.
No guarantees whatsoever.
Don't think its the same problem BUT......
According to our DBA we couldn't do a dbexport to tape using our old version
of On-Line (4) on SCO OPenServer (5) because dbexports > 2GB to tape simply
didn't work.
Like you we didn't have enough space to do it to disk but were eventually
able to get round the problem by creating a script that would compress the
unload files as they were being created by dbexport.
This is a bit of a pain but it may be something you could try so that you
can see if the dbexport finishes when done to disk.
Robert Taylor <robertt@scotlegal.com> wrote:
[snip]
> Like you we didn't have enough space to do it to disk but were eventually
> able to get round the problem by creating a script that would compress the
> unload files as they were being created by dbexport.
[snip]
Hi
Good idea. If Ameerul do not need an export probably
following two scripts will help.
First: unload und compress table by table with SCRIPT 1.
Second: dbschema -d databasename [-ss] dbschemascriptfile.sql
Third: if necessary use SCRIPT 2 to load the tables,
after having executed dbschemascriptfile.sql
SCRIPT 1:
#!/bin/sh
# UnLoad entire database, no system tables, no views
# no exclusive lock needed as with dbexport
EXPODIR=/home2/export
export EXPODIR
cd $EXPODIR/databasename
dbaccess databasename << EOF > /tmp/tablesu.tmp
select tabname from systables
where tabid >= 100 and tabtype = "T";EOF
for tab in `cat /tmp/tablesu.tmp`
do
if [ "$tab" != "tabname" ]
then
echo "unload to $tab.unl select * from $tab...\\c"
dbaccess databasename << EOF 1>/dev/null 2>&1
set isolation to dirty read;
set lock mode to wait;
unload to $tab.unl select * from $tab;EOF
stat=$?
if [ $stat -ne 0 ]
then
echo "Cancelled at $tab error $stat"
exit 1
else
echo "OK!"
gzip $tab.unl
fi
fi
done
exit 0
SCRIPT 2:
#!/bin/sh
# Load entire database, no system tables, after executing sql-script,
# which was created with dbschema -d databasename -ss dbschemafile,
# probably modified
# The unload-files where created by a corresponding unload-job
EXPODIR=/home2/export
export EXPODIR
dbaccess databasename << EOF > /tmp/tablesux.tmp
select tabname from systables
where tabid >= 100;EOF
cd $EXPODIR/databasename.unl
for tab in `cat /tmp/tablesux.tmp`
do
if [ "$tab" != "tabname" ]
then
gunzip $tab.unl.gz
echo "load from $tab.unl insert into $tab...\\c"
dbaccess databasename << EOF 1>/dev/null 2>&1
load from $tab.unl insert into $tab;EOF
stat=$?
if [ $stat -ne 0 ]
then
echo "Abbruch bei $tab Fehler $stat"
exit 1
else
echo "OK!"
#### to save space
rm $tab.unl
##### safer: gzip $tab.unl
#### end to save space
fi
fi
done
exit 0
SCRIPT 1 runs each night for all databases
because I want further security. I know, it´s
not very efficient but I don´t know how to recover
a single database from my onbar / networker backup.
That is needed after a logical user mistake and I could
apply the unloads 1 time. The users where very happy!
Reinhard