Operating System - HP-UX
1751755 Members
4405 Online
108781 Solutions
New Discussion юеВ

Re: How to restart an aborted dbimport of an Informix Database?

 
SOLVED
Go to solution
Juerg DENNEBERG
Advisor

How to restart an aborted dbimport of an Informix Database?

Hi all
I try to dbimport an Informix DB (IDS 7.30). For some reason it aborts after having imported some tables.
How is the syntax to continue this aborted job? I want to skip the table which caused the abort. May be I have to modify the .sql-file
Many thanks
Juerg
The personal liberty goes so far as it does not affect the liberty of others
6 REPLIES 6
Tim D Fulford
Honored Contributor
Solution

Re: How to restart an aborted dbimport of an Informix Database?

You can do this IF the import is comming from disk. If so there is a control file (*.sql) which basically lists all the tables, edit this file appropriately, either
o start from scratch by "drop database xxxx" or "drop table yyy" then restart the import without the troublesome table (commet it out in the *.sql file)
OR
o Keep work to now & comment out the previously loaded tables & troubled table.

My preference is for the first. The table that you are having problems with can be done individually by using the appropriate SQL (moist of which is in the *.sql file) & dbaccess/isql

regards

Tim
-
Steve Lewis
Honored Contributor

Re: How to restart an aborted dbimport of an Informix Database?

You cannot resume a partially-completed dbimport. You would have to drop the database and start again.

This is because the first thing a dbimport does is to create the database - if it alrady exists it aborts immediately.

I suggest you fix the error which made it stop.

Your other option for completing the load is to dbaccess the rest of the CREATE TABLE statements in the .sql file, then dbload all the remaining tables one by one. I suggest you do that without logging, then create the indexes, then the triggers, stored procs, views and synonyms, then update statistics etc. This option is normally only reasonable if it aborts right near the end of a large import.

Tim D Fulford
Honored Contributor

Re: How to restart an aborted dbimport of an Informix Database?

Steve,

I'm fairly sure you can comment out the CREATE DATABASE stuff & it should run. If not, then it will fail with whatever error & you will be no further forward/backwards than you were, so no harm in trying (other than the risk of editing the .sql file incorrectly!)

I said, the "drop database xxx" option is my prefered route.

Juerg, if you supply the .sql & say what table went wrong Steve (or me) may be able to help.

Regards

Tim
-
Rainer von Bongartz
Honored Contributor

Re: How to restart an aborted dbimport of an Informix Database?

re-starting a corrupted dbimport is not so easy.
You should find out the reason why it aborted.

Of course you can edit the .sql file and comment out the import of the problem table . The frop the database from dbaccess and restart the dbimport.

What was the error message you got from your dbimport.

Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Steve Lewis
Honored Contributor

Re: How to restart an aborted dbimport of an Informix Database?

There is no CREATE DATABASE statement in a dbimport/dbexport sql file.
There is a statement with the datbase name - but that line is already commented out between {}s. I tried deleting this line, but still dbimport tries to create the database.

I tested interrupting a dbimport, deleting the database line, then re-running it. dbimport failed, it said cannot create database - duplicate value for record with unique key i.e. sysmaster:sysdatabases.

You have to drop the database.

Tim D Fulford
Honored Contributor

Re: How to restart an aborted dbimport of an Informix Database?

Steve gets braggin rights, I get humble pie!!!

Tim
-