Constraint name constraint-name already exists.
Posted in 2000
Topics: Storage & Space Management, Security, Permissions & Auditing
Hi!
I'm using WinNT 4.0 sp 5 and Informix 7.3x.
When I export database there are "not null" constraint names added to
export sql (ie. "station_id nchar(16) not null constraint
"informix".n173_199," see the example below).
So when I importing the error -625 appears. Then I manually delete the
constratint names from SQL and import the database again.
Thanks
Rok
WRONG sql:
create table "informix".printers_avail
(
station_id nchar(16) not null constraint "informix".n173_199,
printer_port nchar(10) not null constraint "informix".n173_200,
device_name nchar(40) not null constraint "informix".n173_201,
primary key (station_id,device_name) constraint
"informix".pk_printers_avail
) extent size 16 next size 16 lock mode row;
revoke all on "informix".printers_avail from "public";
RIGHT sql:
create table "informix".printers_avail
(
station_id nchar(16) not null ,
printer_port nchar(10) not null ,
device_name nchar(40) not null ,
primary key (station_id,device_name) constraint
"informix".pk_printers_avail
) extent size 16 next size 16 lock mode row;
revoke all on "informix".printers_avail from "public";
Rok:
This I believe only 7.3x after this release it does not surface. It is
always good to name constraint you never know what's in store in due
course.
Rgds
Rok Vizintin wrote:
> Hi!
> I'm using WinNT 4.0 sp 5 and Informix 7.3x.
>
> When I export database there are "not null" constraint names added to
> export sql (ie. "station_id nchar(16) not null constraint
> "informix".n173_199," see the example below).
> So when I importing the error -625 appears. Then I manually delete the
> constratint names from SQL and import the database again.
>
> Thanks
> Rok
>
> WRONG sql:
> create table "informix".printers_avail
> (
> station_id nchar(16) not null constraint "informix".n173_199,
> printer_port nchar(10) not null constraint "informix".n173_200,
> device_name nchar(40) not null constraint "informix".n173_201,
> primary key (station_id,device_name) constraint
> "informix".pk_printers_avail
> ) extent size 16 next size 16 lock mode row;
> revoke all on "informix".printers_avail from "public";>
> RIGHT sql:
> create table "informix".printers_avail
> (
> station_id nchar(16) not null ,
> printer_port nchar(10) not null ,
> device_name nchar(40) not null ,
> primary key (station_id,device_name) constraint
> "informix".pk_printers_avail
> ) extent size 16 next size 16 lock mode row;
> revoke all on "informix".printers_avail from "public";
Rok Vizintin wrote:
>
> Hi!
> I'm using WinNT 4.0 sp 5 and Informix 7.3x.
>
> When I export database there are "not null" constraint names added to
> export sql (ie. "station_id nchar(16) not null constraint
> "informix".n173_199," see the example below).
> So when I importing the error -625 appears. Then I manually delete the
> constratint names from SQL and import the database again.
[SNIP]
Get my utility myschema, a dbschema replacement, which does not suffer
from this unfortunate illness. It also has many nice features that
dbschema does not have including automatic extent sizing options.
Myschema is part of the package utils2_ak in the IIUG Software
Repository.
--
Art S. Kagel & Family
kagel@erols.com