
Troubleshooting: Problems importing contracts
If importing a contract fails, check the size of the XML file that defines the contract. If you have an XML file that is larger than 1 MB, you must first increase the column size of the STOREXML column in the CNTRSTORE database table, and the XMLDEFINITION column in the TCTATTR table.
The following is an example of how to increase the column size for these tables to 2 MB.

EXPORT TO tcattr.ixf OF IXF MESSAGES tcattr.out SELECT * FROM
TCATTR;
DROP TABLE TCATTR;
CREATE TABLE tcattr (
termcond_id BIGINT NOT NULL,
type INTEGER NOT NULL,
trading_id BIGINT NOT NULL,
sequence INTEGER NOT NULL DEFAULT 0,
xmldefinition CLOB(20000000) NOT NULL,
optcounter SMALLINT
)
IN USERSPACE1
INDEX IN USERSPACE1
;
ALTER TABLE tcattr
ADD PRIMARY KEY (termcond_id, type, sequence);
ALTER TABLE tcattr
ADD CONSTRAINT f_924
FOREIGN KEY (trading_id)
REFERENCES trading
ON DELETE CASCADE;
ALTER TABLE tcattr
ADD CONSTRAINT f_923
FOREIGN KEY (termcond_id)
REFERENCES termcond
ON DELETE CASCADE;
CREATE INDEX I0000807 ON tcattr
(
trading_id ASC
);
IMPORT FROM tcattr.ixf OF IXF MESSAGES tcattr.out INSERT INTO
TCATTR;
EXPORT TO cntrstore.ixf OF IXF MESSAGES cntrstore.out SELECT * FROM
CNTRSTORE;
DROP TABLE CNTRSTORE;
CREATE TABLE cntrstore (
contract_id BIGINT NOT NULL,
storexml CLOB(20000000) NOT NULL,
optcounter SMALLINT
)
IN USERSPACE1
INDEX IN USERSPACE1
;
ALTER TABLE cntrstore
ADD PRIMARY KEY (contract_id);
ALTER TABLE cntrstore
ADD CONSTRAINT f_912
FOREIGN KEY (contract_id)
REFERENCES contract
ON DELETE CASCADE;
IMPORT FROM cntrstore.ixf OF IXF MESSAGES cntrstore.out INSERT INTO
CNTRSTORE;