注册账号 登录
用友之家-用友软件论坛 返回首页

zhezhe2009的个人空间 https://www.oyonyou.com/?140131 [收藏] [复制] [分享] [RSS]

日志

已创建表 'IA_Subsidiary',但其最大行大小(9427)超过了每行的最大字节数(8060)。

热度 1已有 5805 次阅读2014-7-18 13:58

升级账套:0042005年度账失败,错误号: 852
数据库名:ufdata—020-2005
data—str-bp-61-t3tot6
data—str-bp-61-t3tot6
错误信息:
-2147217900    
警告: 已创建表 'IA_Subsidiary',但其最大行大小(9427)超过了每行的最大字节数(8060)。如果结果行长度超过 8060 字节,则此表中行的 INSERT UPDATE 将失败。
 

执行下列语句出错:
----
自定义项为约束的表特殊处理 'JustInVouchs','IA_Subsidiary'
ALTER TABLE [dbo].[IA_Subsidiary] DROP CONSTRAINT [DF__ia_subsid__cDefi__11165497]
ALTER TABLE [dbo].[IA_Subsidiary] DROP CONSTRAINT [DF__ia_subsid__cDefi__120A78D0]
ALTER TABLE [dbo].[IA_Subsidiary] DROP CONSTRAINT [DF__ia_subsid__cDefi__12FE9D09]
ALTER TABLE [dbo].[IA_Subsidiary] DROP CONSTRAINT [DF__ia_subsid__cDefi__13F2C142]

 

 

 

 

 

 

此问题最根本的原因不是类型的事情,而是因为这'JustInVouchs','IA_Subsidiary' 这两张表的约束和其他可以升级的正常年度的约束名字不一致造成的。 如果这两张表中有数据存在的话,只需要把每个年度的下的两张表的约束的名字改成 和其他年度一样的即可,  如果没有用到这两张表,就是表中没有数据,可以把这两张表删除重新建即可。 附加上SQL语句。
跟大家说一下,如果用sql2008的数据库则不会报这个错误,会报 找不到
[DF__ia_subsid__cDefi__11165497]这个约束名字   只需要把约束名字改成正确的即可。
2000
的数据库就会报楼主这样的错误,所以必须改约束名字,应该是从以前的版本升级上来造成的遗留问题。 或者年度数据右键 数据库属性-选项-设置-自动关闭为勾选 或者也能解决问题   下面的命令有两行是把这两张表删除掉的命令,请大家注意一下。  

友情提示,一定要备份好数据!!!如果删除错误勿怪。

USE [UFDATA_002_2004]
GO
/****** Object:  Table [dbo].[JustInVouchs]    Script Date: 06/12/2014 14:09:57 ******/
drop table JustInVouchs
drop table IA_Subsidiary

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[JustInVouchs](
        [AutoID] [int] NOT NULL,
        [cJVCode] [varchar](30) NOT NULL,
        [CorID] [int] NULL,
        [cCorCode] [varchar](30) NULL,
        [cInvCode] [varchar](20) NOT NULL,
        [iJVPrice] [money] NULL,
        [cJVBatch] [varchar](20) NULL,
        [cObjCode] [varchar](12) NULL,
        [cFree1] [varchar](20) NULL,
        [cFree2] [varchar](20) NULL,
        [cDefine22] [nvarchar](60) NULL,
        [cDefine23] [nvarchar](60) NULL,
        [cDefine24] [nvarchar](60) NULL,
        [cDefine25] [nvarchar](60) NULL,
        [cDefine26] [float] NULL,
        [cDefine27] [float] NULL,
        [cItemCode] [varchar](20) NULL,
        [cItem_class] [varchar](10) NULL,
        [cName] [varchar](60) NULL,
        [cItemCName] [varchar](20) NULL,
        [iJustInsId] [int] NULL,
        [cBVencode] [varchar](20) NULL,
        [cFree3] [varchar](20) NULL,
        [iMassDate] [int] NULL,
        [dMadeDate] [datetime] NULL,
        [cInVouchCode] [varchar](30) NULL,
        [cFree4] [varchar](20) NULL,
        [cFree5] [varchar](20) NULL,
        [cFree6] [varchar](20) NULL,
        [cFree7] [varchar](20) NULL,
        [cFree8] [varchar](20) NULL,
        [cFree9] [varchar](20) NULL,
        [cFree10] [varchar](20) NULL,
        [cDefine28] [varchar](120) NULL,
        [cDefine29] [varchar](120) NULL,
        [cDefine30] [varchar](120) NULL,
        [cDefine31] [varchar](120) NULL,
        [cDefine32] [varchar](120) NULL,
        [cDefine33] [varchar](120) NULL,
        [cDefine34] [int] NULL,
        [cDefine35] [int] NULL,
        [cDefine36] [datetime] NULL,
        [cDefine37] [datetime] NULL,
CONSTRAINT [aaaaaJustInVouchs_PK] PRIMARY KEY NONCLUSTERED
(
        [AutoID] ASC
) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[IA_Subsidiary]    Script Date: 06/12/2014 14:09:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[IA_Subsidiary](
        [AutoID] [int] IDENTITY(1,1) NOT NULL,
        [bRdFlag] [bit] NOT NULL,
        [cBusType] [varchar](8) NULL,
        [cBusCode] [varchar](30) NULL,
        [cVouCode] [varchar](30) NULL,
        [ID] [int] NULL,
        [ValueID] [int] NULL,
        [JustID] [int] NULL,
        [dVouDate] [datetime] NULL,
        [dKeepDate] [datetime] NULL,
        [iMonth] [tinyint] NOT NULL,
        [iPZID] [int] NULL,
        [iPZDate] [datetime] NULL,
        [cPZtype] [varchar](8) NULL,
        [cPZdigest] [varchar](60) NULL,
        [cInvHead] [varchar](15) NULL,
        [cDifHead] [varchar](15) NULL,
        [cOppHead] [varchar](15) NULL,
        [cVouType] [varchar](4) NULL,
        [cPTCode] [varchar](2) NULL,
        [cSTCode] [varchar](2) NULL,
        [cWhCode] [varchar](10) NULL,
        [cAccDep] [varchar](12) NULL,
        [cInvCode] [varchar](20) NOT NULL,
        [cRdCode] [varchar](5) NULL,
        [cVenCode] [varchar](20) NULL,
        [cCusCode] [varchar](20) NULL,
        [cOrderCode] [varchar](30) NULL,
        [cARVCode] [varchar](30) NULL,
        [cBillCode] [int] NULL,
        [cDLCode] [int] NULL,
        [cPSPCode] [varchar](12) NULL,
        [cProCode] [varchar](50) NULL,
        [cDepCode] [varchar](12) NULL,
        [cPersonCode] [varchar](8) NULL,
        [cHandler] [varchar](20) NULL,
        [iAInQuantity] [float] NULL,
        [iAOutQuantity] [float] NULL,
        [iInCost] [float] NULL,
        [iOutCost] [float] NULL,
        [iAInPrice] [money] NULL,
        [iAOutPrice] [money] NULL,
        [cBatchCode] [varchar](20) NULL,
        [iDebitDifCost] [money] NULL,
        [iCreditDifCost] [money] NULL,
        [cAccounter] [varchar](20) NULL,
        [cMaker] [varchar](20) NULL,
        [bFlag] [tinyint] NULL,
        [bMoneyFlag] [bit] NOT NULL,
        [bSale] [bit] NOT NULL,
        [cMemo] [varchar](60) NULL,
        [cDefine1] [varchar](20) NULL,
        [cDefine2] [varchar](20) NULL,
        [cDefine3] [varchar](20) NULL,
        [cDefine4] [datetime] NULL,
        [cDefine5] [int] NULL,
        [cDefine6] [datetime] NULL,
        [cDefine7] [float] NULL,
        [cDefine8] [varchar](4) NULL,
        [cDefine9] [varchar](8) NULL,
        [cDefine10] [varchar](60) NULL,
        [cFree1] [varchar](20) NULL,
        [cFree2] [varchar](20) NULL,
        [cPZID] [varchar](30) NULL,
        [cDefine22] [nvarchar](60) NULL,
        [cDefine23] [nvarchar](60) NULL,
        [cDefine24] [nvarchar](60) NULL,
        [cDefine25] [nvarchar](60) NULL,
        [cDefine26] [float] NULL,
        [cDefine27] [float] NULL,
        [cItem_class] [varchar](10) NULL,
        [cItemCode] [varchar](20) NULL,
        [cName] [varchar](60) NULL,
        [cItemCName] [varchar](20) NULL,
        [noJustQuantity] [userdecimal] NULL,
        [cFree3] [varchar](20) NULL,
        [cFree4] [varchar](20) NULL,
        [cFree5] [varchar](20) NULL,
        [cFree6] [varchar](20) NULL,
        [cFree7] [varchar](20) NULL,
        [cFree8] [varchar](20) NULL,
        [cFree9] [varchar](20) NULL,
        [cFree10] [varchar](20) NULL,
        [cDefine11] [varchar](120) NULL,
        [cDefine12] [varchar](120) NULL,
        [cDefine13] [varchar](120) NULL,
        [cDefine14] [varchar](120) NULL,
        [cDefine15] [int] NULL,
        [cDefine16] [float] NULL,
        [cDefine28] [varchar](120) NULL,
        [cDefine29] [varchar](120) NULL,
        [cDefine30] [varchar](120) NULL,
        [cDefine31] [varchar](120) NULL,
        [cDefine32] [varchar](120) NULL,
        [cDefine33] [varchar](120) NULL,
        [cDefine34] [int] NULL,
        [cDefine35] [int] NULL,
        [cDefine36] [datetime] NULL,
        [cDefine37] [datetime] NULL,
        [psvsid] [int] NULL,
        [cCXHDcode] [varchar](30) NULL,
        [cCXFScode] [varchar](20) NULL,
CONSTRAINT [aaaaaIA_Subsidiary_PK] PRIMARY KEY NONCLUSTERED
(
        [AutoID] ASC
) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Default [DF__ia_subsid__cDefi__11165497]    Script Date: 06/12/2014 14:09:57 ******/
ALTER TABLE [dbo].[IA_Subsidiary] ADD  CONSTRAINT [DF__ia_subsid__cDefi__11165497]  DEFAULT (NULL) FOR [cDefine22]
GO
/****** Object:  Default [DF__ia_subsid__cDefi__120A78D0]    Script Date: 06/12/2014 14:09:57 ******/
ALTER TABLE [dbo].[IA_Subsidiary] ADD  CONSTRAINT [DF__ia_subsid__cDefi__120A78D0]  DEFAULT (NULL) FOR [cDefine23]
GO
/****** Object:  Default [DF__ia_subsid__cDefi__12FE9D09]    Script Date: 06/12/2014 14:09:57 ******/
ALTER TABLE [dbo].[IA_Subsidiary] ADD  CONSTRAINT [DF__ia_subsid__cDefi__12FE9D09]  DEFAULT (NULL) FOR [cDefine24]
GO
/****** Object:  Default [DF__ia_subsid__cDefi__13F2C142]    Script Date: 06/12/2014 14:09:57 ******/
ALTER TABLE [dbo].[IA_Subsidiary] ADD  CONSTRAINT [DF__ia_subsid__cDefi__13F2C142]  DEFAULT (NULL) FOR [cDefine25]
GO
/****** Object:  Default [DF__ia_subsid__cDefi__14E6E57B]    Script Date: 06/12/2014 14:09:57 ******/
ALTER TABLE [dbo].[IA_Subsidiary] ADD  CONSTRAINT [DF__ia_subsid__cDefi__14E6E57B]  DEFAULT (NULL) FOR [cDefine26]
GO
/****** Object:  Default [DF__ia_subsid__cDefi__15DB09B4]    Script Date: 06/12/2014 14:09:57 ******/
ALTER TABLE [dbo].[IA_Subsidiary] ADD  CONSTRAINT [DF__ia_subsid__cDefi__15DB09B4]  DEFAULT (NULL) FOR [cDefine27]
GO
/****** Object:  Default [DF__JustInVou__cDefi__16CF2DED]    Script Date: 06/12/2014 14:09:57 ******/
ALTER TABLE [dbo].[JustInVouchs] ADD  CONSTRAINT [DF__JustInVou__cDefi__16CF2DED]  DEFAULT (NULL) FOR [cDefine22]
GO
/****** Object:  Default [DF__JustInVou__cDefi__17C35226]    Script Date: 06/12/2014 14:09:57 ******/
ALTER TABLE [dbo].[JustInVouchs] ADD  CONSTRAINT [DF__JustInVou__cDefi__17C35226]  DEFAULT (NULL) FOR [cDefine23]
GO
/****** Object:  Default [DF__JustInVou__cDefi__18B7765F]    Script Date: 06/12/2014 14:09:57 ******/
ALTER TABLE [dbo].[JustInVouchs] ADD  CONSTRAINT [DF__JustInVou__cDefi__18B7765F]  DEFAULT (NULL) FOR [cDefine24]
GO
/****** Object:  Default [DF__JustInVou__cDefi__19AB9A98]    Script Date: 06/12/2014 14:09:57 ******/
ALTER TABLE [dbo].[JustInVouchs] ADD  CONSTRAINT [DF__JustInVou__cDefi__19AB9A98]  DEFAULT (NULL) FOR [cDefine25]
GO
/****** Object:  Default [DF__JustInVou__cDefi__1A9FBED1]    Script Date: 06/12/2014 14:09:57 ******/
ALTER TABLE [dbo].[JustInVouchs] ADD  CONSTRAINT [DF__JustInVou__cDefi__1A9FBED1]  DEFAULT (NULL) FOR [cDefine26]
GO
/****** Object:  Default [DF__JustInVou__cDefi__1B93E30A]    Script Date: 06/12/2014 14:09:57 ******/
ALTER TABLE [dbo].[JustInVouchs] ADD  CONSTRAINT [DF__JustInVou__cDefi__1B93E30A]  DEFAULT (NULL) FOR [cDefine27]
GO
/****** Object:  ForeignKey [FK__IA_Subsid__cDepC__4F7F3212]    Script Date: 06/12/2014 14:09:57 ******/
ALTER TABLE [dbo].[IA_Subsidiary]  WITH CHECK ADD FOREIGN KEY([cDepCode])
REFERENCES [dbo].[Department] ([cDepCode])
GO
/****** Object:  ForeignKey [FK__IA_Subsid__cDepC__5073564B]    Script Date: 06/12/2014 14:09:57 ******/
ALTER TABLE [dbo].[IA_Subsidiary]  WITH CHECK ADD FOREIGN KEY([cDepCode])
REFERENCES [dbo].[Department] ([cDepCode])
GO
/****** Object:  ForeignKey [FK__IA_Subsid__cDepC__51677A84]    Script Date: 06/12/2014 14:09:57 ******/
ALTER TABLE [dbo].[IA_Subsidiary]  WITH CHECK ADD FOREIGN KEY([cDepCode])
REFERENCES [dbo].[Department] ([cDepCode])
GO
/****** Object:  ForeignKey [FK__IA_Subsid__cInvC__525B9EBD]    Script Date: 06/12/2014 14:09:57 ******/
ALTER TABLE [dbo].[IA_Subsidiary]  WITH CHECK ADD FOREIGN KEY([cInvCode])
REFERENCES [dbo].[Inventory] ([cInvCode])
GO
/****** Object:  ForeignKey [FK__IA_Subsid__cInvC__534FC2F6]    Script Date: 06/12/2014 14:09:57 ******/
ALTER TABLE [dbo].[IA_Subsidiary]  WITH CHECK ADD FOREIGN KEY([cInvCode])
REFERENCES [dbo].[Inventory] ([cInvCode])
GO
/****** Object:  ForeignKey [FK__IA_Subsid__cInvC__5443E72F]    Script Date: 06/12/2014 14:09:57 ******/
ALTER TABLE [dbo].[IA_Subsidiary]  WITH CHECK ADD FOREIGN KEY([cInvCode])
REFERENCES [dbo].[Inventory] ([cInvCode])
GO
/****** Object:  ForeignKey [FK__IA_Subsid__cWhCo__55380B68]    Script Date: 06/12/2014 14:09:57 ******/
ALTER TABLE [dbo].[IA_Subsidiary]  WITH CHECK ADD FOREIGN KEY([cWhCode])
REFERENCES [dbo].[Warehouse] ([cWhCode])
GO
/****** Object:  ForeignKey [FK__IA_Subsid__cWhCo__562C2FA1]    Script Date: 06/12/2014 14:09:57 ******/
ALTER TABLE [dbo].[IA_Subsidiary]  WITH CHECK ADD FOREIGN KEY([cWhCode])
REFERENCES [dbo].[Warehouse] ([cWhCode])
GO
/****** Object:  ForeignKey [FK__IA_Subsid__cWhCo__572053DA]    Script Date: 06/12/2014 14:09:57 ******/
ALTER TABLE [dbo].[IA_Subsidiary]  WITH CHECK ADD FOREIGN KEY([cWhCode])
REFERENCES [dbo].[Warehouse] ([cWhCode])
GO
/****** Object:  ForeignKey [FK__JustInVou__cInvC__58147813]    Script Date: 06/12/2014 14:09:57 ******/
ALTER TABLE [dbo].[JustInVouchs]  WITH CHECK ADD FOREIGN KEY([cInvCode])
REFERENCES [dbo].[Inventory] ([cInvCode])
GO

 

 

 



路过

雷人

握手

鲜花

鸡蛋

发表评论 评论 (1 个评论)

回复 cao646802 2016-2-14 09:12
谢谢zhezhe2009的共享。

facelist

您需要登录后才可以评论 登录 | 注册账号

QQ|站长微信|Archiver|手机版|小黑屋|用友之家 ( 蜀ICP备07505338号|51072502110008 )

GMT+8, 2024-11-23 15:23 , Processed in 0.047134 second(s), 10 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

返回顶部