sql - Detach and re-attach from db2 partitioned tables -


i created partioned table. used incorrect quotation syntax 'maxvalue'. needs maxvalue below. how can fix problem?

create table rmobjectspar  (                   "obj_libraryid" smallint not null ,                    "obj_itemid" char(26 octets) not null ,                    "obj_version" smallint not null default 1 ,                    "obj_collectionid" integer not null ,                    "obj_mgtclassid" smallint not null ,                    "obj_stgclassid" smallint not null ,                    "obj_attributes" smallint not null default 0 ,                    "obj_retention" integer not null default 0 ,                    "obj_volumeid" integer not null ,                    "obj_stagedvolumeid" integer not null default -1 ,                    "obj_path" integer not null ,                    "obj_status" char(1 octets) not null ,                    "obj_size" bigint not null ,                    "obj_createdate" timestamp not null default current timestamp ,                    "obj_updatedate" timestamp not null default current timestamp ,                    "obj_referenceddate" timestamp not null default current timestamp ,                    "obj_actiondate" date not null ,                    "obj_mgtclassdate" date not null ,                    "obj_stgclassdate" date not null ,                    "obj_playstatus" char(1 octets) not null ,                    "obj_volstatus" char(1 octets) not null ,                    "obj_objectname" varchar(128 octets) default '' ,                    "obj_orgfilename" varchar(1024 octets) default '' ,                    "obj_filename" varchar(128 octets) default '' ,                    "obj_mimetype" varchar(128 octets) not null default 'text/html' ,                    "obj_offset" bigint not null default -1 ,                    "obj_signature" varchar(514 octets) bit data )    partition range(obj_itemid)     (     partition par1 starting minvalue ending 'a1001001a14l31c35959j99999' in objects,     partition par2 starting 'a1001001a14a01a00000a00001' ending 'a1001001a14l31c35959j99999' in objects01,     partition par3 starting 'a1001001a15a01a00000a00001' ending 'a1001001a15f31c35959j99999' in objects02,     partition par4 starting 'a1001001a16g01a00000a00001' ending 'a1001001a16l31c35959j99999' in objects03,     partition par5 starting 'a1001001a16g01a00000a00001' ending 'a1001001a16l31c35959j99999' in objects04,     partition par6 starting 'a1001001a17g01a00000a00001' ending 'a1001001a17l31c35959j99999' in objects05,     partition par7 starting 'a1001001a18g01a00000a00001' ending 'a1001001a18l31c35959j99999' in objects06,     partition par8 starting 'a1001001a19g01a00000a00001' ending 'a1001001a19l31c35959j99999' in objects07,     partition par9 starting 'b0000000000000000000000001' ending 'maxvalue' in objects08     ); 

sorry not have db2 multisystem ptf installed on our iseries system, can't test sql statements, here solution re-attach par9:

alter table rmobjectspar detach partition par9 dummy;  alter table rmobjectspar attach partition par9 starting 'b0000000000000000000000001' ending @ maxvalue in objects08  dummy; 

this should solve issue, please first test make sure.

on side note, maybe define partitions instead:

partition range(obj_itemid)     (     partition par1 starting minvalue ending 'a1001001a14a01a00000a00001' exclusive in objects,     partition par2 starting 'a1001001a14a01a00000a00001' in objects01,     partition par3 starting 'a1001001a15a01a00000a00001' in objects02,     partition par4 starting 'a1001001a16g01a00000a00001' in objects03,     partition par5 starting 'a1001001a16g01a00000a00001' in objects04,     partition par6 starting 'a1001001a17g01a00000a00001' in objects05,     partition par7 starting 'a1001001a18g01a00000a00001' in objects06,     partition par8 starting 'a1001001a19g01a00000a00001' in objects07,     partition par9 starting 'b0000000000000000000000001' ending maxvalue in objects08     ); 

references used:

adding data partitions partitioned tables

alter table statement


Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -