BMXAA6818I - ConfigDB 已針對綱目 dbo 啟動,已連接至資料庫 jdbc:sqlserver://localhost:1433;database=maxdb71;integratedSecurity=false; Mon Sep 08 11:01:11 CST 2025 update maxvars set varvalue = '1' where varname = 'CONFIGURING' go commit go commit go update maxattributecfg set canautonum = 1 where objectname = 'ZZ_AI_PLUG_STEP_RECORD' and attributename = 'ZZ_AI_PLUG_STEP_RECORDID' and not exists (select 1 from maxtablecfg where tablename = maxattributecfg.entityname and uniquecolumnname is not null and uniquecolumnname = maxattributecfg.columnname) go update maxviewcolumncfg set changed = 'R' where tablecolumnname is not null and tablecolumnname != 'ROWSTAMP' and tablecolumnname != 'TENANTID' and not exists (select * from maxattributecfg where entityname = tablename and columnname = tablecolumnname and changed != 'R') go update maxattributecfg set changed = 'R' where exists (select * from maxviewcolumncfg where viewname = entityname and viewcolumnname = columnname and changed = 'R') go update maxattributecfg set maxtype = 'BIGINT', length = 19 where changed = 'I' and maxtype != 'BIGINT' and objectname in (select objectname from maxobjectcfg where changed = 'I') and exists (select 1 from maxtablecfg where tablename = maxattributecfg.entityname and uniquecolumnname is not null and uniquecolumnname = maxattributecfg.columnname) go update maxattributecfg set maxtype = 'BIGINT', length = 19 where changed = 'I' and maxtype != 'BIGINT' and sameasobject is not null and sameasattribute is not null and exists (select 1 from maxattributecfg a2 where a2.attributename = maxattributecfg.sameasattribute and a2.objectname = maxattributecfg.sameasobject and a2.maxtype = 'BIGINT' and a2.changed = 'I') go commit go BMXAA0364I - 取得 meta 資料 Mon Sep 08 11:01:22 CST 2025 BMXAA0349I - 配置表格 Mon Sep 08 11:01:22 CST 2025 BMXAA0347I - 建立表格 ZZ_AI_PLUG_STEP_RECORD Mon Sep 08 11:01:22 CST 2025 create table zz_ai_plug_step_record ( zz_ai_plug_step_recordid bigint not null, equipmentid varchar (40) null, aimlayout varchar (100) null, tagname varchar (40) null, value double precision null, result varchar (30) null, remark varchar (200) null, customer_value varchar (200) null, imageuri varchar (50) null, isuploaded smallint not null, ismodified smallint not null, rangemin double precision null, rangemax double precision null, specmin double precision null, specmax double precision null, gaugetype varchar (50) null, unit varchar (50) null, createdtime datetime null, updatedtime datetime null, rowstamp timestamp ) on 'PRIMARY' go create unique index zz_ai_plug_step_record_ndx1 on zz_ai_plug_step_record(zz_ai_plug_step_recordid) on 'PRIMARY' go insert into maxsyskeys (ixname, colname, colseq, ordering, changed, maxsyskeysid) values ('ZZ_AI_PLUG_STEP_RECORD_NDX1','ZZ_AI_PLUG_STEP_RECORDID',1 , 'A', 'N', 164760) go insert into maxsysindexes (name,tbname,uniquerule,changed,clusterrule,storagepartition, required, textsearch, maxsysindexesid) values ('ZZ_AI_PLUG_STEP_RECORD_NDX1','ZZ_AI_PLUG_STEP_RECORD','U','N',0,'PRIMARY', 0, 0, 154180) go commit go commit go BMXAA0342I - 配置視圖 Mon Sep 08 11:01:23 CST 2025 commit go BMXAA0344I - 重新整理屬性 meta 資料 Mon Sep 08 11:01:23 CST 2025 delete from autokey where not exists (select * from maxattributecfg c where c.autokeyname = autokey.autokeyname and c.changed != 'R') go delete from l_maxattrcfg where ownerid in (select maxattributeid from maxattributecfg where changed = 'R') go delete from maxattributecfg where changed = 'R' go delete from maxviewcolumncfg where changed = 'R' go update maxattributecfg set attributeno = 2 where objectname = 'ZZ_AI_PLUG_STEP_RECORD' and attributename = 'EQUIPMENTID' go update maxattributecfg set attributeno = 3 where objectname = 'ZZ_AI_PLUG_STEP_RECORD' and attributename = 'AIMLAYOUT' go update maxattributecfg set attributeno = 4 where objectname = 'ZZ_AI_PLUG_STEP_RECORD' and attributename = 'TAGNAME' go update maxattributecfg set attributeno = 5 where objectname = 'ZZ_AI_PLUG_STEP_RECORD' and attributename = 'VALUE' go update maxattributecfg set attributeno = 6 where objectname = 'ZZ_AI_PLUG_STEP_RECORD' and attributename = 'RESULT' go update maxattributecfg set attributeno = 7 where objectname = 'ZZ_AI_PLUG_STEP_RECORD' and attributename = 'REMARK' go update maxattributecfg set attributeno = 8 where objectname = 'ZZ_AI_PLUG_STEP_RECORD' and attributename = 'CUSTOMER_VALUE' go update maxattributecfg set attributeno = 9 where objectname = 'ZZ_AI_PLUG_STEP_RECORD' and attributename = 'IMAGEURI' go update maxattributecfg set attributeno = 10 where objectname = 'ZZ_AI_PLUG_STEP_RECORD' and attributename = 'ISUPLOADED' go update maxattributecfg set attributeno = 11 where objectname = 'ZZ_AI_PLUG_STEP_RECORD' and attributename = 'ISMODIFIED' go update maxattributecfg set attributeno = 12 where objectname = 'ZZ_AI_PLUG_STEP_RECORD' and attributename = 'RANGEMIN' go update maxattributecfg set attributeno = 13 where objectname = 'ZZ_AI_PLUG_STEP_RECORD' and attributename = 'RANGEMAX' go update maxattributecfg set attributeno = 14 where objectname = 'ZZ_AI_PLUG_STEP_RECORD' and attributename = 'SPECMIN' go update maxattributecfg set attributeno = 15 where objectname = 'ZZ_AI_PLUG_STEP_RECORD' and attributename = 'SPECMAX' go update maxattributecfg set attributeno = 16 where objectname = 'ZZ_AI_PLUG_STEP_RECORD' and attributename = 'GAUGETYPE' go update maxattributecfg set attributeno = 17 where objectname = 'ZZ_AI_PLUG_STEP_RECORD' and attributename = 'UNIT' go update maxattributecfg set attributeno = 18 where objectname = 'ZZ_AI_PLUG_STEP_RECORD' and attributename = 'CREATEDTIME' go update maxattributecfg set attributeno = 19 where objectname = 'ZZ_AI_PLUG_STEP_RECORD' and attributename = 'UPDATEDTIME' go delete from maxattribute go delete from l_maxattribute go insert into maxattribute (objectname, attributename, attributeno, alias, autokeyname, canautonum, classname, columnname, defaultvalue, domainid, eauditenabled, entityname, esigenabled, isldowner, ispositive, length, maxtype, mustbe, required, persistent, primarykeycolseq, remarks, sameasattribute, sameasobject, scale, title, userdefined, searchtype, mlsupported, mlinuse, handlecolumnname, maxattributeid, restricted, localizable, textdirection, complexexpression, extended) select objectname, attributename, attributeno, alias, autokeyname, canautonum, classname, columnname, defaultvalue, domainid, eauditenabled, entityname, esigenabled, isldowner, ispositive, length, maxtype, mustbe, required, persistent, primarykeycolseq, remarks, sameasattribute, sameasobject, scale, title, userdefined, searchtype, mlsupported, mlinuse, handlecolumnname, maxattributeid, restricted, localizable, textdirection, complexexpression, extended from maxattributecfg go insert into l_maxattribute (l_maxattributeid, ownerid, langcode, remarks, title) select l_maxattrcfgid, ownerid, langcode, remarks, title from l_maxattrcfg go update maxattributecfg set changed = 'N' where changed != 'N' go delete from maxviewcolumn go insert into maxviewcolumn (viewname, viewcolumnname, samestorageas, tablename, tablecolumnname, maxviewcolumnid) select viewname, viewcolumnname, samestorageas, tablename, tablecolumnname, maxviewcolumnid from maxviewcolumncfg go update maxviewcolumncfg set changed = 'N' where changed != 'N' go commit go BMXAA0343I - 重新整理物件 meta 資料 Mon Sep 08 11:01:27 CST 2025 delete from maxtable go delete from maxtablecfg where tablename in (select entityname from maxobjectcfg where isview = 0 and changed = 'R') go delete from maxview go delete from maxviewcfg where viewname in (select entityname from maxobjectcfg where isview = 1 and changed = 'R') go delete from maxobject go delete from l_maxobject go delete from l_maxobjectcfg where ownerid in (select maxobjectid from maxobjectcfg where changed = 'R') go delete from maxobjectcfg where changed = 'R' go update maxobjectcfg set changed = 'N' go insert into maxobject (objectname, classname, description, eauditenabled, eauditfilter, entityname, esigfilter, extendsobject, hasld, imported, internal, isview, langcode, mainobject, maxobjectid, persistent, resourcetype, servicename, siteorgtype, textdirection, userdefined) select objectname, classname, description, eauditenabled, eauditfilter, entityname, esigfilter, extendsobject, hasld, imported, internal, isview, langcode, mainobject, maxobjectid, persistent, resourcetype, servicename, siteorgtype, textdirection, userdefined from maxobjectcfg go insert into l_maxobject (l_maxobjectid, ownerid, langcode, description) select l_maxobjectcfgid, ownerid, langcode, description from l_maxobjectcfg go insert into maxtable (tablename, addrowstamp, eaudittbname, isaudittable, restoredata, storagepartition, textsearchenabled, langtablename, langcolumnname, uniquecolumnname, islangtable, maxtableid, altixname, trigroot, contentattribute, storagetype, exttablename) select tablename, addrowstamp, eaudittbname, isaudittable, restoredata, storagepartition, textsearchenabled, langtablename, langcolumnname, uniquecolumnname, islangtable, maxtableid, altixname, trigroot, contentattribute, storagetype, exttablename from maxtablecfg go insert into maxview (viewname, viewselect, viewwhere, autoselect, maxviewid, viewfrom) select viewname, viewselect, viewwhere, autoselect, maxviewid, viewfrom from maxviewcfg go commit go delete from appfielddefaults where not exists (select * from maxattribute where maxattribute.objectname = appfielddefaults.objectname and maxattribute.attributename = appfielddefaults.attributename) go commit go BMXAA0341I - 重建原生索引 Mon Sep 08 11:01:27 CST 2025 BMXAA0340I - 重新整理索引 meta 資料 Mon Sep 08 11:01:27 CST 2025 commit go BMXAA0339I - 更新表格儲存體分割區 Mon Sep 08 11:01:27 CST 2025 update maxtable set storagepartition = (select sysfilegroups.groupname from dbo.sysindexes, sysobjects, sysfilegroups where dbo.sysindexes.id = sysobjects.id and sysobjects.name = lower(maxtable.tablename) and sysobjects.type = 'U' and dbo.sysindexes.groupid = sysfilegroups.groupid and dbo.sysindexes.indid <= 1 ) go update maxtablecfg set storagepartition = (select sysfilegroups.groupname from dbo.sysindexes, sysobjects, sysfilegroups where dbo.sysindexes.id = sysobjects.id and sysobjects.name = lower(maxtablecfg.tablename) and sysobjects.type = 'U' and dbo.sysindexes.groupid = sysfilegroups.groupid and dbo.sysindexes.indid <= 1 ) go commit go commit go sp_indexoption 'zz_ai_plug_step_record.zz_ai_plug_step_record_ndx1', 'AllowPageLocks', FALSE go update maxsequence set maxreserved = 36725 where sequencename = 'MAXVIEWCOLUMNSEQ' go update maxsequence set maxreserved = 1986 where sequencename = 'MAXVIEWSEQ' go update maxsequence set maxreserved = 1 where sequencename = 'L_MAXOBJECTUSEQ' go update maxsequence set maxreserved = 59060 where sequencename = 'MAXTABLESEQ' go update maxsequence set maxreserved = 279719 where sequencename = 'MAXATTRIBUTECFGSEQ' go update maxsequence set maxreserved = 76756 where sequencename = 'MAXOBJECTSEQ' go update maxsequence set maxreserved = 36725 where sequencename = 'MAXVIEWCOLUMNCFGSEQ' go update maxsequence set maxreserved = 76756 where sequencename = 'MAXOBJECTCFGSEQ' go update maxsequence set maxreserved = 1 where sequencename = 'L_MAXATTRCFGSEQ' go update maxsequence set maxreserved = 1 where sequencename = 'L_MAXATTRIBUTEUSEQ' go update maxsequence set maxreserved = 279719 where sequencename = 'MAXATTRIBUTESEQ' go update maxsequence set maxreserved = 59060 where sequencename = 'MAXTABLECFGSEQ' go update maxsequence set maxreserved = 1986 where sequencename = 'MAXVIEWCFGSEQ' go update maxsequence set maxreserved = 1 where sequencename = 'L_MAXOBJECTCFGSEQ' go update maxvars set varvalue = '864' where varname = 'DBVERSION' go commit go update maxvars set varvalue = '5' where varname = 'NUMBEROFTAXCODES' go commit go delete from maxattributeskipcopy where maxattributeskipcopyid not in (select maxattributeskipcopyid from maxattributeskipcopy masc, maxattributecfg macfg where masc.attributename = macfg.attributename and masc.objectname = macfg.objectname) go commit go commit go sp_fulltext_catalog 'textcatalog', 'start_full' go BMXAA0337I - 請確定已建立這些新表格 ZZ_AI_PLUG_STEP_RECORD 的索引 Mon Sep 08 11:01:29 CST 2025 update maxvars set varvalue = '0' where varname = 'CONFIGURING' go commit go BMXAA6820I - ConfigDB 已完成,而且沒發生錯誤。 Mon Sep 08 11:01:29 CST 2025