cancel
Showing results for 
Search instead for 
Did you mean: 

DB disconnects during table alterations

Former Member
0 Kudos
1,663

SQL Anywhere version 11

**Existing table**

CREATE TABLE "DBA"."SYscans" (
    "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.';

**Script**

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)

Question

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

Accepted Solutions (0)

Answers (0)