Re: onload and constraints in 7.3
Posted in 1999
Dick Brieck wrote:
> I'm using IDS 7.3 on Solaris 2.6. I just onunloaded and onloaded a table
> that had a primary key constraint. Upon running a dbschema against the
> loaded table I find that the sql for the primary key was generated.
> According to the Answers Online version 2.0 the constraints are not
> preserved:
>
>
>
> Utilities for Data Migration 11-75
> Unloading a Database or Table
>
> ... When you unload and load a table, onunload does not preserve
> access privilege, synonyms, views, constraints, triggers, or default
> values that were associated with the original tables. Before you run
> onunload, use the dbschema utility to obtain a listing of the access
> privilege, synonyms, views, constraints, triggers, or default values.
> After you finish loading the table, use dbschema to recreate the
> specific information for the table...
>
> This sql was included when I did a dbschema on the table:
>
> alter table "informix".master_file add constraint primary key
> (ma_loan_num) constraint "informix".mas_fil_pk_1 ;
>
> I tested inserting a duplicate ma_loan_num value and received:
>
> 239: Could not insert new row - duplicate value in a UNIQUE INDEX
column.
> 100: ISAM error: duplicate value for a record with unique key.>
> It certainly appears that the constraint has been preserved. Has
> onunload/onload been updated to include constraints? Any thoughts on
this
> are certainly appreciated.
Looks like new (starting from which version?) but not documented yet
feature. Check onload usage. It contains
[{-c <old constraint name> <new constraint name>}]
which means onunload is saving constraint info. And there are
even fixed bugs related to constraints in release notes.
>
> Dick Brieck
> DBA, Chase Manhattan Mortgage Corporation
>
Vardan
--
Vardan Aroustamian
vaar@geocities.com