达梦数据库DmException: 变量空间溢出 [sql]: INSERT INTO,Microsoft.EntityFrameworkCore.DbUpdateException
达梦数据库DmException: 变量空间溢出 [sql]: INSERT INTO,Microsoft.EntityFrameworkCore.DbUpdateException
错误内容
Microsoft.EntityFrameworkCore.DbUpdateException:“An error occurred while saving the entity changes. See the inner exception for details.”
DmException: 变量空间溢出 [sql]: {
INSERT INTO "CSFrameworkV6_Normal"."_Demo_Customer" ("isid", "Address1", "Address2", "Address3", "Bank", "BankAccount", "BankAddress", "City", "CityCode", "ContactPerson", "Country", "CountryCode", "CreatedBy", "CreationDate", "CustomerCode", "Email", "EnglishName", "Fax", "InUse", "LastUpdateDate", "LastUpdatedBy", "NativeName", "PaymentTerm", "PostalCode", "Region", "Remark", "Tel", "WebAddress", "ZipCode")
VALUES (:p0, :p1, :p2, :p3, :p4, :p5, :p6, :p7, :p8, :p9, :p10, :p11, :p12, :p13, :p14, :p15, :p16, :p17, :p18, :p19, :p20, :p21, :p22, :p23, :p24, :p25, :p26, :p27, :p28);
INSERT INTO "CSFrameworkV6_Normal"."_Demo_Customer" ("isid", "Address1", "Address2", "Address3", "Bank", "BankAccount", "BankAddress", "City", "CityCode", "ContactPerson", "Country", "CountryCode", "CreatedBy", "CreationDate", "CustomerCode", "Email", "EnglishName", "Fax", "InUse", "LastUpdateDate", "LastUpdatedBy", "NativeName", "PaymentTerm", "PostalCode", "Region", "Remark", "Tel", "WebAddress", "ZipCode")
VALUES (:p29, :p30, :p31, :p32, :p33, :p34, :p35, :p36, :p37, :p38, :p39, :p40, :p41, :p42, :p43, :p44, :p45, :p46, :p47, :p48, :p49, :p50, :p51, :p52, :p53, :p54, :p55, :p56, :p57);
INSERT INTO "CSFrameworkV6_Normal"."_Demo_Customer" ("isid", "Address1", "Address2", "Address3", "Bank", "BankAccount", "BankAddress", "City", "CityCode", "ContactPerson", "Country", "CountryCode", "CreatedBy", "CreationDate", "CustomerCode", "Email", "EnglishName", "Fax", "InUse", "LastUpdateDate", "LastUpdatedBy", "NativeName", "PaymentTerm", "PostalCode", "Region", "Remark", "Tel", "WebAddress", "ZipCode")
错误原因
使用 DmDbContext.AddRange()方法报错。
使用DmAdapter.Update(DataTable)方法报错。
解决方案
查看VM_STACK_SIZE参数值,256KB。
SELECT para_name,para_value from v$dm_ini WHERE para_name='VM_STACK_SIZE';
调整dm.ini中的VM_STACK_SIZE(静态参数)参数值为10240(10MB),重启达梦数据库服务,问题解决。
C:\Program Files\dmdbms\data\DAMENG\dm.ini