I have run into this problem with SQL Server also. Dropping unique indexes takes care of it. However, I am also running into serious problems with deadlocks in SQL Server when loading large amounts of data programatically with simple methods. Everything I have read suggests indexes could be the culprit, but I haven't made the connection.
Vince Clark www.globalera.com [email protected] (303) 493-6723 office (303) 523-4843 cell ----- Original Message ----- From: "David E Jones" <[email protected]> To: [email protected] Sent: Sunday, August 30, 2009 8:59:21 PM GMT -07:00 US/Canada Mountain Subject: Re: problem Running with MS-SQL This sounds like one of those MS-SQL quirks with unique indexes where it only allows one row with each possible value, including null. In other words, there can only be one record with a null value in that column. If I remember right this has come up before too... There may be a way to change the ALTER statement that adds the index to tell it to not include null. It would be nice if that was the default since the whole notion is silly, but that's just my subjective opinion and obviously theirs is different. -David On Aug 30, 2009, at 8:00 PM, Scott Gray wrote: > Hi Weixue, > > Could you point me to an example of where the demo data violates a > unique constraint? > > Thanks > Scott > > HotWax Media > http://www.hotwaxmedia.com > > On 31/08/2009, at 12:12 PM, weixuezhang wrote: > >> Either demo data or entitymodel definition has problem. Can someone >> look into this problem? >> >> I found 6 places with unique="true" in trunk as below. I simply >> changed "true" into "false", then started from creating a new >> database. >> >> accounting\entitydef\entitymodel.xml >> 1,931: <index name="GLACCT_UNQCD" unique="true"> >> >> marketing\entitydef\entitymodel.xml >> 216: <index name="CNTLSTCST_MSG_ID" unique="true"> >> >> party\entitydef\entitymodel.xml (2 matches) >> 714: <index name="COMMEVT_MSG_ID" unique="true"> >> 1,007: <index name="EMAIL_VERIFY_HASH" unique="true"> >> >> product\entitydef\entitymodel.xml (2 matches) >> 1,839: <index name="INVITEM_SOFID" unique="true"> >> 1,842: <index name="INVITEM_ACTNM" unique="true"> >> >> I found demo data doesn't specify value for some of these fields, >> default value of them is null. When inserting multiple records of >> data, demo data seeding will get failure due to the unique index >> constrain. >> >> Thanks. >> Weixue Zhang >> >> >> >> 发件人: Abhijeet Pandey >> 发送时间: 2009-08-27 16:03:30 >> 收件人: user >> 抄送: weixuezhang; Abhijeet Pandey >> 主题: Re: problem Running with MS-SQL >> >> Hi Zhang, >> >> Thanks for this. >> >> Can you guide me that if i need to change all "unique=false" in all >> the entitymodel.xml (there are about 26 of them)? >> >> Hi All, >> >> >> Does anyone have an idea that why it happens with MSSQL ? >> >> Thanks , >> >> Abhijeet Pandey >> >> >> >> On Sun, Aug 16, 2009 at 4:16 PM, Weixue Zhang <[email protected] >> > wrote: >> >> >> I am using ms sql server 2005 and this problem had bothered me for >> long time. >> At last I found it was caused by a few unique indices of some >> tables (You >> can find them by searching with "unique="true"" in files >> entitymodel.xml). >> After I changed them into "unique=false", demo data works fine. Can >> anybody >> explain why this problem doesn't exist with other database servers, >> and why >> we need to set unique=true at some indices while most others are >> unique=false? >> >> Weixue Zhang >> -- >> View this message in context: >> http://www.nabble.com/problem-Running-with-MS-SQL-tp24895969p24992345.html >> >> Sent from the OFBiz - User mailing list archive at Nabble.com. >> >> >> >> >> >> -- >> Abhijeet Pandey >
