cancel
Showing results for 
Search instead for 
Did you mean: 

Catalog export results in bad syntax for LOB with DEFAULT values

simon_matter
Participant
0 Kudos

(I have already posed this before here [; but got the impression that it's because our instance was corrupt somehow.)

Loader catalog export produces DDL files with wrong syntax. This is on MaxDB Version 7.7.07.16.

How to reproduce:

Create a table like this:

CREATE TABLE "SOMETHING"
(
        "GROUPID"  Fixed (3,0)  NOT NULL  DEFAULT    1,
        "LOBCOL"  Clob ASCII  NOT NULL  DEFAULT '<abc><123>',
        CONSTRAINT SYSPRIMARYKEY PRIMARY KEY("GROUPID")
)

Now to a catalog export:

EXPORT TABLE something CATALOG OUTSTREAM 'something_ddl.catalog'

Look at the exported DDL file:

//
USE SCHEMA "DBUSER"
//
CREATE TABLE "SOMETHING"
(
        "GROUPID"  Fixed (3,0)  NOT NULL  DEFAULT    1,
        "LOBCOL"  Clob ASCII  NOT NULL  DEFAULT <abc><123>,
        CONSTRAINT SYSPRIMARYKEY PRIMARY KEY("GROUPID")
)
//

See the default value of "LOBCOL", it misses the apostrophes and can therefore not be used for import!

I guess this should be easy to fix in the sorces

Thanks,

Simon

Accepted Solutions (0)

Answers (2)

Answers (2)

steffen_schildberg
Active Participant
0 Kudos

No reaction for a long time and change requests mentioned in answer

simon_matter
Participant
0 Kudos

Once we try the 7.8 upgrade I'll report how it works for us.

steffen_schildberg
Active Participant
0 Kudos

Hi Simon,

you're completely right: this CLOB issue as well as the BLOB issue you reported in are bugs in the Loader and will be fixed asap. Unfortunately there is no workaround for this other than to fix this manually in generated CATALOG files.

Sorry for any inconvenience and best regards,

Steffen

simon_matter
Participant
0 Kudos

Hi Steffen,

Thanks for your confirmation. My problem is that I'm still stuck by this issue [; which prevents me from doing export, edit, import. Do you think this is related somehow?

The problem is that I can export every single table of the schema successfully but doing an export user or export schema crashes.

Thanks,

Simon

steffen_schildberg
Active Participant
0 Kudos

Hi Simon,

both problems are not related to each other. The one with LOBs and default is a bug in Loader while generating SQL whereas the other problem is a bug in the MaxDB kernel. I will check with the kernel developers for a possible workaround.

Best regards,

Steffen