Error when running Generate Data Model

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

Thanks,

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)

1 Like

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.

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

Which version of Epicor ERP are you running?

We are running : 10.1.400.31

  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.

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.

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

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.

Thanks Nathan I will upload it right away.

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

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.

2 Likes