DBImport ANSI or Non-ANSI
Posted in 1999
Topics: Migration, Import/Export & Data Conversion
Have a question relating to importing to an non-ANSI database then
converting to ANSI. The reason we are dealing with ANSI in the first place
is that this is a PeopleSoft system which is defined that way. Here is the
situation:
Currently, we export from an ANSI database and import into ANSI using the
following:
dbimport -i /hradb99/hexp pol75 -l -ANSI -d pol751
The draw back here is the overhead that comes with logging, long running
transactions and the concern that the import will blow off if not enough
logs have been allocated. We deal with some large databases and when an
import runs for 5 hours and blows off because the logs fill, it can be time
consuming and frustrating.
What we want to do is import with no logging:
dbimport -i /hradb99/hexp pol75 -d pol751
Then we would us ondblog to change the mode to ANSI. The fear here is that
we might run into problems that may not be obvious and hurt us down the
road. We know that once the database is ANSI it cannot be changed to
anything else. Sounds as if something important goes on 'under the covers'
for ANSI to cause this 'no turning back' issue (not that we need to turn
back, it just causes some concern with us).
Anyway, the question is:
Does dbimport need to load as ANSI if the database will eventually be
converted to ANSI? In other words, is the import doing anything behind the
scenes with ANSI that would be needed and would not be there if we imported
as non-ANSI and then converted afterwards.
Dave Hargrave
Arch Chemicals
#2 Terminal DR
East Alton, IL 62010
(618) 258-6555
dmhargrave@archchemicals.com
The differences between ANSI and other modes are as follows:
System is allways in transactions, i.e. you can use only COMMIT and ROLLBACK statements. Transaction is
implicitly started when U connect to DB and after each
of these statements.
There are other differences in SQL, but this is related to the program, not the data.
Main difference is that standard informix behaviour is that object names must be
unique, i.e. table names must be different. In ANSI mode owner.name combination
must be unique, so different owners can have table with the same name in the database.
So:
In ANSI mode "informix".table1 and "user".table1 can exist in the same database while
in the other modes this will create an error.
I suppose that this is the reason U can't just change back from ANSI mode to
something else. It could cause errors, so it is not implemented.
Imoprting database without logging and changing logging mode afterwards is safe.
However to change mode U should use ontape command:
ontape -s -L 0 -A <database_name>
Change of logging occurs only after backup, so U can do this in one step. Since U
have just imported the data U can set LOGTAPEDEV to null in ONCONFIG before
this and change it back to normal tape device afterwards.
--
Slobodan Zorko
======================================
Alfatec Group
Technical Support
Kranjceviceva 36, 10000 Zagreb
Phone: +385(1) 3647 077
E-Mail: slobodan.zorko@zg.tel.hr