解决PowerDesigner 16 Generate Datebase For Sql2005/2008 对象名sysproperties无效的问题
在PowerDesigner 16 中生成的sql语句,在执行的时候报错:对象名sysproperties 无效的错误;造成此问题的原因是由于Sql 2005、2008 删除了系统表 sysproperties 而改用 sys.extended_properties 表所致
很明显这些都是产生设计注释的,可以忽略掉,
设置PowerDesinger生成选项,将Comment字段去掉
之后生成的SQL语句 就不包含那些有错的代码了,不需要修改改什么模板代码 乱七八槽的了。
if exists (select 1 from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F') where r.fkeyid = object_id('tCollectionHistory') and o.name = 'FK_tCollectionHistory_REFERENCE_tControlNodes') alter table tCollectionHistory drop constraint FK_tCollectionHistory_REFERENCE_tControlNodes go if exists (select 1 from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F') where r.fkeyid = object_id('tCollectionLog') and o.name = 'FK_tCollectionLog_REFERENCE_tControlNodes') alter table tCollectionLog drop constraint FK_tCollectionLog_REFERENCE_tControlNodes go if exists (select 1 from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F') where r.fkeyid = object_id('tControlNodes') and o.name = 'FK_TCONTROL_REFERENCE_TWORKSHO') alter table tControlNodes drop constraint FK_TCONTROL_REFERENCE_TWORKSHO go if exists (select 1 from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F') where r.fkeyid = object_id('tControlNodesCurrentValue') and o.name = 'FK_tControlNodesCurrentValue_REFERENCE_tControlNodes') alter table tControlNodesCurrentValue drop constraint FK_tControlNodesCurrentValue_REFERENCE_tControlNodes go if exists (select 1 from sysindexes where id = object_id('tCollectionHistory') and name = 'Index_1' and indid > 0 and indid < 255) drop index tCollectionHistory.Index_1 go if exists (select 1 from sysobjects where id = object_id('tCollectionHistory') and type = 'U') drop table tCollectionHistory go if exists (select 1 from sysindexes where id = object_id('tCollectionLog') and name = 'Index_1' and indid > 0 and indid < 255) drop index tCollectionLog.Index_1 go if exists (select 1 from sysobjects where id = object_id('tCollectionLog') and type = 'U') drop table tCollectionLog go if exists (select 1 from sysindexes where id = object_id('tControlNodes') and name = 'Index_1' and indid > 0 and indid < 255) drop index tControlNodes.Index_1 go if exists (select 1 from sysobjects where id = object_id('tControlNodes') and type = 'U') drop table tControlNodes go if exists (select 1 from sysobjects where id = object_id('tControlNodesCurrentValue') and type = 'U') drop table tControlNodesCurrentValue go if exists (select 1 from sysindexes where id = object_id('tWorkShop') and name = 'Index_1' and indid > 0 and indid < 255) drop index tWorkShop.Index_1 go if exists (select 1 from sysobjects where id = object_id('tWorkShop') and type = 'U') drop table tWorkShop go /*==============================================================*/ /* Table: tCollectionHistory */ /*==============================================================*/ create table tCollectionHistory ( iID_tControlNodes uniqueidentifier not null, cNodeNmae nvarchar(50) not null, cValue nvarchar(50) not null, dCreate datetime not null default getDate(), constraint PK_TCOLLECTIONHISTORY primary key (iID_tControlNodes) ) go /*==============================================================*/ /* Index: Index_1 */ /*==============================================================*/ create unique index Index_1 on tCollectionHistory ( cNodeNmae ASC, iID_tControlNodes ASC ) go /*==============================================================*/ /* Table: tCollectionLog */ /*==============================================================*/ create table tCollectionLog ( iID_tControlNodes uniqueidentifier not null, cNodeName nvarchar(50) null, cValue nvarchar(50) null, iType smallint null, dCreate datetime not null default getdate(), cReturnInfo nvarchar(4000) null, constraint PK_TCOLLECTIONLOG primary key (iID_tControlNodes) ) go /*==============================================================*/ /* Index: Index_1 */ /*==============================================================*/ create unique index Index_1 on tCollectionLog ( iID_tControlNodes ASC, cNodeName ASC ) go /*==============================================================*/ /* Table: tControlNodes */ /*==============================================================*/ create table tControlNodes ( iID_tWorkShop uniqueidentifier not null, iID uniqueidentifier RowGuidCol not null constraint NodeRowID default 'NEWSEQUENTIALID()', cNodeName nvarchar(50) not null, cDescription nvarchar(200) null, cMeasureUp nvarchar(20) null, cMeasureDown nvarchar(20) null, cUnit nvarchar(10) null, cDisplayFormat nvarchar(10) null, bDisabled bit not null default 0, dCreate datetime not null default getdate(), constraint PK_TCONTROLNODES primary key (iID) ) go /*==============================================================*/ /* Index: Index_1 */ /*==============================================================*/ create unique index Index_1 on tControlNodes ( iID_tWorkShop ASC, cNodeName ASC ) go /*==============================================================*/ /* Table: tControlNodesCurrentValue */ /*==============================================================*/ create table tControlNodesCurrentValue ( iID_tControlNodes uniqueidentifier not null, cValue nvarchar(50) not null, dInvoke datetime not null default getDate(), constraint PK_TCONTROLNODESCURRENTVALUE primary key (iID_tControlNodes) ) go /*==============================================================*/ /* Table: tWorkShop */ /*==============================================================*/ create table tWorkShop ( iID uniqueidentifier RowGuidCol not null constraint workShopID default 'NEWSEQUENTIALID()', cName nvarchar(50) not null, cMemo nvarchar(200) null, dCreate datetime not null default getdate(), constraint PK_TWORKSHOP primary key (iID) ) go /*==============================================================*/ /* Index: Index_1 */ /*==============================================================*/ create unique index Index_1 on tWorkShop ( cName ASC ) go alter table tCollectionHistory add constraint FK_tCollectionHistory_REFERENCE_tControlNodes foreign key (iID_tControlNodes) references tControlNodes (iID) go alter table tCollectionLog add constraint FK_tCollectionLog_REFERENCE_tControlNodes foreign key (iID_tControlNodes) references tControlNodes (iID) go alter table tControlNodes add constraint FK_TCONTROL_REFERENCE_TWORKSHO foreign key (iID_tWorkShop) references tWorkShop (iID) go alter table tControlNodesCurrentValue add constraint FK_tControlNodesCurrentValue_REFERENCE_tControlNodes foreign key (iID_tControlNodes) references tControlNodes (iID) go
南来地,北往的,上班的,下岗的,走过路过不要错过!
======================个性签名=====================
之前认为Apple 的iOS 设计的要比 Android 稳定,我错了吗?
下载的许多客户端程序/游戏程序,经常会Crash,是程序写的不好(内存泄漏?刚启动也会吗?)还是iOS本身的不稳定!!!
如果在Android手机中可以简单联接到ddms,就可以查看系统log,很容易看到程序为什么出错,在iPhone中如何得知呢?试试Organizer吧,分析一下Device logs,也许有用.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· SQL Server 2025 AI相关能力初探
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
2018-10-11 iOS Memory Deep Dive