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?
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)
aidacra
(Nathan your friendly neighborhood Support Engineer)
7
Navigate to C:\Users[WindowsUserNameThatExecutedTheDataModelRegen]\AppData\Local\Temp\Epicor\DataModelGenerator
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.
aidacra
(Nathan your friendly neighborhood Support Engineer)
8
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
aidacra
(Nathan your friendly neighborhood Support Engineer)
10
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.
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.