# Error when running Generate Data Model

**URL:** <https://www.epiusers.help/t/error-when-running-generate-data-model/48060>\
**Category:** Epicor ERP 10\
**Created:** [September 24, 2018, 12:03am UTC](https://www.epiusers.help/t/error-when-running-generate-data-model/48060 "2018-09-24T00:03:08Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![mserry](https://www.epiusers.help/user_avatar/www.epiusers.help/mserry/32/27768_2.png) [@mserry](https://www.epiusers.help/u/mserry)\
**Post date:** [September 24, 2018, 12:03am UTC](https://www.epiusers.help/t/error-when-running-generate-data-model/48060/1 "2018-09-24T00:03:08Z")

</div>

Hi,

We are trying to add a UD field to the Company Table for the first time. When we run Generate Data Mobel we get a Sync error for Erp.Company\_UD and it says to check the logs for more details.

Anyone know where is this log file? or fix this error?

![image](https://epiusers.help/uploads/default/original/2X/b/bc84af492f68fe1a583e1c00d0d1642051190e18.png)

Thanks,

---

<div class="post-metadata">

**Author:** ![hkeric.wci](https://www.epiusers.help/user_avatar/www.epiusers.help/hkeric.wci/32/52019_2.png) [@hkeric.wci](https://www.epiusers.help/u/hkeric.wci)\
**Post date:** [September 24, 2018, 12:34am UTC](https://www.epiusers.help/t/error-when-running-generate-data-model/48060/2 "2018-09-24T00:34:36Z")

</div>

That should lead you to go login into epicor and go to UD Table Maintenance… just go to the Menu Search and type in Extended to find the menu… Load Company\_UD and review the columns in there.

I cant remember where the logs are by heart I think its C:\programdata\epicor or in %APPDATA% or in C:\Program Files (x86)\Common Files look for Epicor folder and there should be an Admin Console folder or DataGen (been a while typing on phone)

---

<div class="post-metadata">

**Author:** ![Chris\_Conn](https://www.epiusers.help/user_avatar/www.epiusers.help/chris_conn/32/93797_2.png) [@Chris\_Conn](https://www.epiusers.help/u/Chris_Conn)\
**Post date:** [September 24, 2018, 1:22am UTC](https://www.epiusers.help/t/error-when-running-generate-data-model/48060/3 "2018-09-24T01:22:03Z")

</div>

Log are the key however, you can check for obvious issues like invalid names (weird character, spaces, duplicate names).

Also, verify your admin console extension matches your DB version.

---

<div class="post-metadata">

**Author:** ![mserry](https://www.epiusers.help/user_avatar/www.epiusers.help/mserry/32/27768_2.png) [@mserry](https://www.epiusers.help/u/mserry)\
**Post date:** [September 27, 2018, 1:34pm UTC](https://www.epiusers.help/t/error-when-running-generate-data-model/48060/4 "2018-09-27T13:34:03Z")

</div>

> [@hkeric.wci](#):
>
> %APPDATA%

I looked everywhere and I can`t find any logs. Any other suggestions?

---

<div class="post-metadata">

**Author:** ![aidacra](https://www.epiusers.help/user_avatar/www.epiusers.help/aidacra/32/17997_2.png) [@aidacra](https://www.epiusers.help/u/aidacra)\
**Post date:** [September 27, 2018, 1:55pm UTC](https://www.epiusers.help/t/error-when-running-generate-data-model/48060/5 "2018-09-27T13:55:25Z")

</div>

Which version of Epicor ERP are you running?

---

<div class="post-metadata">

**Author:** ![mserry](https://www.epiusers.help/user_avatar/www.epiusers.help/mserry/32/27768_2.png) [@mserry](https://www.epiusers.help/u/mserry)\
**Post date:** [September 27, 2018, 1:58pm UTC](https://www.epiusers.help/t/error-when-running-generate-data-model/48060/6 "2018-09-27T13:58:40Z")

</div>

We are running : 10.1.400.31

---

<div class="post-metadata">

**Author:** ![aidacra](https://www.epiusers.help/user_avatar/www.epiusers.help/aidacra/32/17997_2.png) [@aidacra](https://www.epiusers.help/u/aidacra)\
**Post date:** [September 27, 2018, 2:10pm UTC](https://www.epiusers.help/t/error-when-running-generate-data-model/48060/7 "2018-09-27T14:10:33Z")

</div>

1. Navigate to C:\Users[WindowsUserNameThatExecutedTheDataModelRegen]\AppData\Local\Temp\Epicor\DataModelGenerator
2. Review the DataModelGenerator.log log.

Please attach the .log file for review.

To save some time, if you compress the entire DataModelGenerator folder it can be used with the log file to determine what the issue is.

---

<div class="post-metadata">

**Author:** ![aidacra](https://www.epiusers.help/user_avatar/www.epiusers.help/aidacra/32/17997_2.png) [@aidacra](https://www.epiusers.help/u/aidacra)\
**Post date:** [September 27, 2018, 2:22pm UTC](https://www.epiusers.help/t/error-when-running-generate-data-model/48060/8 "2018-09-27T14:22:50Z")

</div>

And as I was testing this, I have a problem with my 10.1.400 database. Here is my log.

```
Start time: 9/27/2018 9:08:18 AM
Database server: mps-cs-sqlsvr1\sql2014
Database name: E10DemoDB_101400_CURRENT
Using Windows authentication: True
Schemas to include: 
Tables to exclude: Ice.SysSequence,Ice.DBMigrationLog,Ice.SessionState,Ice.SysAgentSchedProcessing
Generator version: 3.1.400.0
Server version: 3.1.400.9
Extracting "Epicor.ServiceModel.dll" from "C:\Program Files (x86)\Common Files\Epicor Software\Database Manager Extensions\3.1.400\DataModelGenerator\..\DbMigration.zip" to "C:\Users\NAAnderson\AppData\Local\Temp\Epicor\DataModelGenerator\Deployment\Server\Bin".
Extracting "Epicor.System.dll" from "C:\Program Files (x86)\Common Files\Epicor Software\Database Manager Extensions\3.1.400\DataModelGenerator\..\DbMigration.zip" to "C:\Users\NAAnderson\AppData\Local\Temp\Epicor\DataModelGenerator\Deployment\Server\Bin".
Synchronizing schema changes.

At least one user defined column must be defined.

Error Generating the Data Models: The following tables were not synchronized due to errors. Review the log for more detailed information. Tables:
Erp.AC_BCD_UD

```

The issue in my case is that in UD table maintenance that on this table, (Erp.AC\_BCD\_UD) I didn’t include at least one additional user defined field.

---

<div class="post-metadata">

**Author:** ![mserry](https://www.epiusers.help/user_avatar/www.epiusers.help/mserry/32/27768_2.png) [@mserry](https://www.epiusers.help/u/mserry)\
**Post date:** [September 27, 2018, 2:25pm UTC](https://www.epiusers.help/t/error-when-running-generate-data-model/48060/9 "2018-09-27T14:25:56Z")

</div>

Start time: 9/27/2018 9:55:30 AM  
Database server: 192.168.20.126  
Database name: Epicor10\_Datafix  
Using Windows authentication: False  
User ID: sa  
Schemas to include:  
Tables to exclude: Ice.SysSequence,Ice.DBMigrationLog,Ice.SessionState,Ice.SysAgentSchedProcessing  
Generator version: 3.1.400.0  
Server version: 3.1.400.9  
Extracting “Epicor.ServiceModel.dll” from “C:\Program Files (x86)\Common Files\Epicor Software\Database Manager Extensions\3.1.400\DataModelGenerator…\DbMigration.zip” to “C:\Users\administrator.PATTISONSIGN\AppData\Local\Temp\2\Epicor\DataModelGenerator\Deployment\Server\Bin”.  
Extracting “Epicor.System.dll” from “C:\Program Files (x86)\Common Files\Epicor Software\Database Manager Extensions\3.1.400\DataModelGenerator…\DbMigration.zip” to “C:\Users\administrator.PATTISONSIGN\AppData\Local\Temp\2\Epicor\DataModelGenerator\Deployment\Server\Bin”.  
Synchronizing schema changes.  
There is already an object named ‘Company’ in the database.  
ZDBCreateChangeCaptureTrigger for UD Table =Company\_UD  
ALTER TABLE [Erp].[Company\_UD] WITH CHECK ADD CONSTRAINT FK\_Company\_UD\_Company FOREIGN KEY([ForeignSysRowID])  
REFERENCES [Erp].Company  
ON DELETE CASCADE  
ALTER TABLE [Erp].[Company\_UD] CHECK CONSTRAINT FK\_Company\_UD\_Company

IF NOT EXISTS (SELECT 1 from sys.objects WHERE name = ‘Company’ AND SCHEMA\_NAME(schema\_id) = ‘dbo’ AND type = ‘V’)

BEGIN  
DECLARE @SQL as varchar(4000)  
SET @SQL=  
‘CREATE VIEW [Company] AS  
SELECT a._, b._ FROM [Erp].[Company] a  
LEFT OUTER JOIN [Erp].[Company\_UD] b  
ON a.SysRowID = b.ForeignSysRowID’  
EXEC (@SQL)  
END  
ELSE exec sp\_refreshview ‘dbo.Company’

EXEC [Ice].[SPCreateUDForIM] Erp,Company

ALTER TABLE [IM].[IMCompany] ADD LeaseInterestRate\_c decimal(14,4) NOT NULL DEFAULT ((0.00))  
ALTER TABLE [IM].[IMCompany] ADD CONSTRAINT [UD\_CHK\_IMCompany\_LeaseInterestRate\_c] CHECK (1=1)

ALTER TABLE [IM].[IMCompany] ADD OnCallMaintenance\_c decimal(14,4) NOT NULL DEFAULT ((0.00))  
ALTER TABLE [IM].[IMCompany] ADD CONSTRAINT [UD\_CHK\_IMCompany\_OnCallMaintenance\_c] CHECK (1=1)

ALTER TABLE [IM].[IMCompany] ADD PersonalPropertyTax\_c decimal(14,4) NOT NULL DEFAULT ((0.00))  
ALTER TABLE [IM].[IMCompany] ADD CONSTRAINT [UD\_CHK\_IMCompany\_PersonalPropertyTax\_c] CHECK (1=1)

ALTER TABLE [IM].[IMCompany] ADD PreventativeMaintenance\_c decimal(14,4) NOT NULL DEFAULT ((0.00))  
ALTER TABLE [IM].[IMCompany] ADD CONSTRAINT [UD\_CHK\_IMCompany\_PreventativeMaintenance\_c] CHECK (1=1)

EXEC [Ice].[SPCreateTriggerForUDCreateView] N’Erp’, N’Company’  
Error Generating the Data Models: The following tables were not synchronized due to errors. Review the log for more detailed information. Tables:  
Erp.Company\_UD

---

<div class="post-metadata">

**Author:** ![aidacra](https://www.epiusers.help/user_avatar/www.epiusers.help/aidacra/32/17997_2.png) [@aidacra](https://www.epiusers.help/u/aidacra)\
**Post date:** [September 27, 2018, 2:31pm UTC](https://www.epiusers.help/t/error-when-running-generate-data-model/48060/10 "2018-09-27T14:31:16Z")

</div>

I see the support case that was opened on this, and I’m going to respond via that case. I requested a compressed copy of the DataModelGenerator folder for review. FYI.

---

<div class="post-metadata">

**Author:** ![mserry](https://www.epiusers.help/user_avatar/www.epiusers.help/mserry/32/27768_2.png) [@mserry](https://www.epiusers.help/u/mserry)\
**Post date:** [September 27, 2018, 2:31pm UTC](https://www.epiusers.help/t/error-when-running-generate-data-model/48060/11 "2018-09-27T14:31:53Z")

</div>

Thanks Nathan I will upload it right away.

---

<div class="post-metadata">

**Author:** ![Chris\_Conn](https://www.epiusers.help/user_avatar/www.epiusers.help/chris_conn/32/93797_2.png) [@Chris\_Conn](https://www.epiusers.help/u/Chris_Conn)\
**Post date:** [December 6, 2019, 6:46pm UTC](https://www.epiusers.help/t/error-when-running-generate-data-model/48060/12 "2019-12-06T18:46:39Z")

</div>

Was there ever a resolution on this? If so, could you share some details?

---

<div class="post-metadata">

**Author:** ![hkeric.wci](https://www.epiusers.help/user_avatar/www.epiusers.help/hkeric.wci/32/52019_2.png) [@hkeric.wci](https://www.epiusers.help/u/hkeric.wci)\
**Post date:** [January 18, 2024, 6:21pm UTC](https://www.epiusers.help/t/error-when-running-generate-data-model/48060/13 "2024-01-18T18:21:35Z")

</div>

This issue often occurs due to SQL Permission problems, if you don’t have permissions to DROP Views, ALTER Tables etc… The error can be misleading, but it’s been always associated with SQL Permissions.
