Skip to Content
avatar image
Former Member

Loader doesn't import it's own exports, shows -5004 POS(228) Missing const

While trying to use loader to export and import I found an issue with one of our test instances. The export is done with

EXPORT DB CATALOG OUTSTREAM 'invocadb_ddl.catalog' DATA OUTSTREAM 'invocadb_pages.data'

now importing it into an empty instance I do

IMPORT DB CATALOG INSTREAM 'invocadb_ddl.catalog' DATA INSTREAM 'invocadb_pages.data'

and it shows this in it's log:

IMPORT DB CATALOG INSTREAM 'invocadb_ddl.catalog' DATA INSTREAM 'invocadb_pages.data'
// *
// M    Execute   PACKAGE  to transform  unlocked CATALOG 
// *
CREATE TABLE "IMAGES"
(
"IMAGEID"  Fixed (19,0)  NOT NULL  DEFAULT                    0,
"IMAGETYPE"  Integer  NOT NULL  DEFAULT           0,
"NAME"  Varchar (64) ASCII  NOT NULL  DEFAULT '0',
"IMAGE"  Blob  NOT NULL  DEFAULT  ,
CONSTRAINT SYSPRIMARYKEY PRIMARY KEY("IMAGEID")
)
// *
// E -25392:    '[SAP AG][LIBSDBOD SO][MaxDB] General error;-5004 POS(228) Missing constant'
// M    Loader    7.7.07   Build 016-121-231-153

What's wrong here? I understand it's the IMAGE Blob which shows a DEFAULT but no value. Is this a bug in the loader or did I miss something?

Thanks,

Simon

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Apr 16, 2010 at 12:44 AM

    Hello,

    1) What is the database version?

    As you know the CLOB or BLOB is used to define an alphanumeric column of any length (not for temporary tables) as of for MaxDB versions 7.7. and higher.

    If you have the MAXDB version 7.6 or lower could you use LONG BYTE < for BLOB type > and LONG ASCII (CLOB)

    Please review the documents in MAXDB library at

    http://maxdb.sap.com/doc/7_6/d1/2864403899970ae10000000a155106/content.htm

    http://maxdb.sap.com/doc/7_7/45/3333809faf2b34e10000000a1553f7/content.htm

    2) I could create tables in my database, version 7.7 with following statements:

    CREATE TABLE "IMAGES"

    (

    "IMAGEID" Fixed (19,0) NOT NULL DEFAULT 0,

    "IMAGETYPE" Integer NOT NULL DEFAULT 0,

    "NAME" Varchar (64) ASCII NOT NULL DEFAULT '0',

    "IMAGE" LONG BYTE NOT NULL DEFAULT '01',

    CONSTRAINT SYSPRIMARYKEY PRIMARY KEY("IMAGEID")

    )

    Or

    CREATE TABLE "IMAGES_1"

    (

    "IMAGEID" Fixed (19,0) NOT NULL DEFAULT 0,

    "IMAGETYPE" Integer NOT NULL DEFAULT 0,

    "NAME" Varchar (64) ASCII NOT NULL DEFAULT '0',

    "IMAGE" BLOB NOT NULL DEFAULT '01',

    CONSTRAINT SYSPRIMARYKEY PRIMARY KEY("IMAGEID")

    )

    3) Please let me know if you follow the document for Loader at

    http://maxdb.sap.com/doc/7_7/e1/18a4ab1475462f8f4ab9f3bc4a7517/content.htm

    < we have also u201CLoader Tutorialu201C in MAXDB library>

    And document u201CExporting and Importing LOB Valuesu201D at

    http://maxdb.sap.com/doc/7_7/32/7eb4b0c8eb4732babd8d32799dd22d/content.htm

    So far I did not see that you used the u201Crule LOB OUTSTREAMu2026u201D and u201CLOB INSTREAMu201D.

    Please let us know how the TABLE "IMAGES" was originally created & what is the database version to test loader export/import locally.

    Thank you and best regards, Natalia Khlopina

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      > Hello,

      >

      > 1) What is the database version?

      > As you know the CLOB or BLOB is used to define an alphanumeric column of any length (not for temporary tables) as of for MaxDB versions 7.7. and higher.

      >

      > 2) I could create tables in my database, version 7.7 with following statements:

      >

      > "IMAGE" BLOB NOT NULL DEFAULT '01',

      > CONSTRAINT SYSPRIMARYKEY PRIMARY KEY("IMAGEID")

      >

      > 3) Please let me know if you follow the document for Loader at

      >

      > So far I did not see that you used the u201Crule LOB OUTSTREAMu2026u201D and u201CLOB INSTREAMu201D.

      >

      > Please let us know how the TABLE "IMAGES" was originally created & what is the database version to test loader export/import locally.

      >

      > Thank you and best regards, Natalia Khlopina

      Hello Natalia,

      Thanks for your comments. Here are my findings:

      1) The database version in question is 7.7.07.16 but the problem was the same with 7.7.06.09. I wasn't aware that there is a difference handling LOB's between 7.6 and 7.7.

      2) The instance was migrated from a non MaxDB database long time ago. I think that's why where was the DEFAULT option in the BLOB line but somehow without value. Recreating without DEFAULT has made export and import work.

      3) I've been reading the docs on loader but it just resulted in more confusion. After recreating the IMAGES table I was able to make a catalog export. After that I was also able to export DATA as PAGES and import all again. I just tried it again, I can export and import catalog and data without using LOB OUTSTREAM and LOB INSTREAM. As I understand LOB streams are only used for single table or column export/import.

      As stated above the instance was created long time ago and I don't remember how. That must have been MaxDB 7.5 and I think the DB has been created by importing a MySQL dump somehow. The instance has the been upgraded to 7.6 and 7.7. The reason why I wanted to export and import with the loader was that after upgrading to 7.7.07.16, the instance had a problem. We have enabled automatic statistics update but now on 7.7.07.16 when enabled, the event dispatcher would start the statistic updates but restart it again and again filling logfiles and slowing down the whole system. Therefore I wanted to do a clean export and import to a new instance.

      After recreating the images table I was finally able to transfer the instance and it's working well again.

      Thanks for your help,

      Simon