incompatible schema
Posted in 2006
Topics: Storage & Space Management, Data Types & Schema Design, Versions, Editions & End-of-Life
I am using IDS 9.4 UC2.
I have a fragmented table: ds_fqu and a table: ds_fqu_01 to be attached
to ds_fqu(attached).
It reports the following error when I tried attaching,
alter fragment on table ds_fqu attach ds_fqu_01 as archive_dt >="2004-01-01 00:00:00" AND archive_dt < "2005-01-01 00:00:00" before
dbdata02 ;
#
^
# 783: Cannot attach because of incompatible schema.
#
The two table's schemas are incompatible? why?
Thanks,
Frank
==========================
create table "informix".ds_fqu
(
dataset_name varchar(255,44) not null ,
archive_site char(10) not null ,
path_name varchar(250,50),
archive_dt datetime year to second
)
fragment by expression
(archive_dt < datetime(2004-01-01 00:00:00) year to second
) in dbdata00 ,
((archive_dt >= datetime(2004-01-01 00:00:00) year to second
) AND (archive_dt < datetime(2005-01-01 00:00:00)
year to second ) ) in dbdata01 ,
(archive_dt >= datetime(2005-01-01 00:00:00) year to second
) in dbdata02
extent size 512 next size 512 lock mode row;
create index "informix".ds_fqu_idx on "informix".ds_fqu (archive_dt)
using btree ;
create unique index "informix".ds_fqu_uidx on "informix".ds_fqu
(dataset_name,archive_site,archive_dt) using btree ;
reate table "informix".ds_fqu_01
(
dataset_name varchar(255,44),
archive_site char(10) not null ,
path_name varchar(250,50),
archive_dt datetime year to second
) in dbdata02 extent size 512 next size 512 lock mode row;
create index "informix".ds_fqu_01_idx on "informix".ds_fqu_01
(archive_dt) using btree in dbdata02 ;
create unique index "informix".ds_fqu_01_uidx on "informix".ds_fqu_01
(dataset_name,archive_site,archive_dt) using btree in dbdata02
;
==========================
It's because of the constraint "not null" on dataset_name column.
All constraints must be the same on both tables.
Regards,
Victor
"Yunyao (Fra...." <Yunyao.Qu@noaa.gov> escribió:
I am using IDS 9.4 UC2.
I have a fragmented table: ds_fqu and a table: ds_fqu_01 to be attached
to ds_fqu(attached).
It reports the following error when I tried attaching,
alter fragment on table ds_fqu attach ds_fqu_01 as archive_dt >="2004-01-01 00:00:00" AND archive_dt < "2005-01-01 00:00:00" before
dbdata02 ;
#
^
# 783: Cannot attach because of incompatible schema.
#
The two table's schemas are incompatible? why?
Thanks,
Frank
==========================
create table "informix".ds_fqu
(
dataset_name varchar(255,44) not null ,
archive_site char(10) not null ,
path_name varchar(250,50),
archive_dt datetime year to second
)
fragment by expression
(archive_dt < datetime(2004-01-01 00:00:00) year to second
) in dbdata00 ,
((archive_dt >= datetime(2004-01-01 00:00:00) year to second
) AND (archive_dt < datetime(2005-01-01 00:00:00)
year to second ) ) in dbdata01 ,
(archive_dt >= datetime(2005-01-01 00:00:00) year to second
) in dbdata02
extent size 512 next size 512 lock mode row;
create index "informix".ds_fqu_idx on "informix".ds_fqu (archive_dt)
using btree ;
create unique index "informix".ds_fqu_uidx on "informix".ds_fqu
(dataset_name,archive_site,archive_dt) using btree ;
reate table "informix".ds_fqu_01
(
dataset_name varchar(255,44),
archive_site char(10) not null ,
path_name varchar(250,50),
archive_dt datetime year to second
) in dbdata02 extent size 512 next size 512 lock mode row;
create index "informix".ds_fqu_01_idx on "informix".ds_fqu_01
(archive_dt) using btree in dbdata02 ;
create unique index "informix".ds_fqu_01_uidx on "informix".ds_fqu_01
(dataset_name,archive_site,archive_dt) using btree in dbdata02
;
==========================
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
---------------------------------
Esa persona especial te espera en Yahoo! Encuentros
¡Dejate encontrar!
Descubrilo aquí