SQL Anywhere version 11

**Existing table**

    "conum" "DCONUM" NOT NULL,
    "module" SMALLINT NOT NULL,
    "recseq" "DINTEGER4" NOT NULL,
    "scandate" "datetime" NOT NULL DEFAULT CURRENT TIMESTAMP,
    "scandesc" "DCHAR35" NULL,
    "image" LONG BINARY NULL,
    "fileext" CHAR(5) NULL,
    PRIMARY KEY ( "conum" ASC, "module" ASC, "recseq" ASC, "scandate" ASC )
) IN "system";
COMMENT ON COLUMN "DBA"."SYscans"."module" IS '10-SY,20-GL,etc.';


alter table syscans drop primary key;
alter table syscans add ID1 dkeytype not null default '          ';
alter table syscans add ID2 dkeytype not null default '          ';
alter table syscans add primary key(conum,module,ID1,ID2,recseq,scandate)


when running the above script using dbisqlc.exe, the second statement executes for about a minute and then the database service stops. They're 21,700 rows in the table. This problem exists in several installations so I doubt that it's environment related.

Any suggestions on troubleshooting the problem would be greatly appreciated.

Thanks, Bill

asked 04 Jan '16, 17:27

bill_skelton's gravatar image

accept rate: 0%

edited 04 Jan '16, 18:05

Volker%20Barth's gravatar image

Volker Barth

Are there other connections using the table when running the ALTER TABLE statements? If so, they may lead to (temporary) blocks. Adding columns with NON-NULL values (as here with the defaults) may lead to split rows. But all that explain that ALTER TABLE may take some time but would not explain a database stop...

What does the engine's -o console.log tell?

For logging dbisqlc's output, see here...

(04 Jan '16, 18:11) Volker Barth

Which 11 are you using?

If you are using a version of 11.0.0 or an early build of 11.0.1 your crash may be due to something that was fixed by CR#738617 which was fixed in 11.0.1 builds 2979+.

(05 Jan '16, 18:39) Nick Elson S...
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 04 Jan '16, 17:27

question was seen: 285 times

last updated: 05 Jan '16, 18:39