New Kinetic 2022.2 deployment. Data Model regenerates successfully it says but the data model isn’t in sync. Nothing in the DataModelRegen log other than ‘Data Models generated successfully’. Anyone else run into this and have a fix?
It doesn’t work in the demo database either. I added a single field in their demo dB and ran the regen and it’s out of sync. Thought maybe was something with the copy of our prod dB but doesn’t seem to be.
Yep. I normally stop the App Pool when running the regen. Tried with it stopped and running and manually recycling the App Pool when done. Still out of sync.
It’s really weird. I would expect some sort of error if it was actually failing. I did put an Epicor ticket in but they just said recycle the App Pool.
Someone on the Epicor User Group had a similar issue but they had .NET/NuGet issues. I’m not running into any .NET or NuGet issues. I did reinstall the latest .NET 6 components and verified NuGet was working. Didn’t change anything for me.
It does correctly updated the view in SQL. But the UD columns are not in the model. Can’t use them anywhere and the UD Column Maintenance says it’s out of sync.
That’s the process I follow now in our 10.2.600 production environment. I stop the App Pool on all app servers, run the regen from one of the app servers, restart the App Pool on each app server. Never had an issue. Following that same process in the new 2022.2 test environment it doesn’t work. Data model is still out of sync. I’m out of ideas.
The same set of UD fields work in 10.2.600. So unless Epicor reserved a field in 2022.2 that wasn’t before.
But as a test I created a new Kinetic database and connected it to an app instance. I added a single UD field on customer called ‘mcSalesforceID’. Ran the regen and the model says out of sync. So don’t think it’s a reserved field issue.
Here is the DataModelGenerator.log.
Start time: 3/21/2023 7:43:37 PM
Database server: <dBServer>\<dBInstance>
Database name: Kinetic-2022-2-Test2
Using Windows authentication: True
User ID: <Domain>\<User>
Schemas to include:
Tables to exclude: Ice.SysSequence, Ice.DBMigrationLog
Generator version: 4.2.200.0
Server version: 4.2.200.9
Deletion of C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator failed. Retry attempt #1. Error: The process cannot access the file 'DataModelGenerator.log' because it is being used by another process.
Deletion of C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator failed. Retry attempt #2. Error: The process cannot access the file 'DataModelGenerator.log' because it is being used by another process.
Deletion of C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator failed. Retry attempt #3. Error: The process cannot access the file 'DataModelGenerator.log' because it is being used by another process.
Deletion of C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator failed. Retry attempt #4. Error: The process cannot access the file 'DataModelGenerator.log' because it is being used by another process.
Deletion of C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator failed. Retry attempt #5. Error: The process cannot access the file 'DataModelGenerator.log' because it is being used by another process.
Synchronizing schema changes.
SQL COMMAND TO EXECUTE
{
CREATE TABLE [Erp].[Customer_UD] (
[ForeignSysRowID] [uniqueidentifier] NOT NULL,
[UD_SysRevID] [timestamp] NOT NULL,
[mcSalesforceID_c] nvarchar(36) NOT NULL CONSTRAINT [DF_Customer_UD_mcSalesforceID_c] DEFAULT '',
)
ALTER TABLE [Erp].[Customer_UD] ADD CONSTRAINT [PK_Customer_UD] PRIMARY KEY CLUSTERED ([ForeignSysRowID] ASC) WITH (ALLOW_PAGE_LOCKS = OFF) ON [PRIMARY]
ALTER TABLE [Erp].[Customer_UD] ADD CONSTRAINT [DF_Customer_UD_ForeignSysRowID] DEFAULT (CONVERT([uniqueidentifier],CONVERT([binary](10),newid(),(0))+CONVERT([binary](6),getutcdate(),(0)),(0))) FOR [ForeignSysRowID]
INSERT INTO [Erp].[Customer_UD] (ForeignSysRowID) SELECT (SysRowID) FROM [Erp].[Customer]
}
SQL COMMAND TO EXECUTE
{
EXEC [Ice].[SPCreateTriggerForUDCreateView] N'Erp', N'Customer'
}
SQL COMMAND TO EXECUTE
{
EXEC [Ice].[SyncColumnAttribute] N'Erp', N'Customer_UD'
}
SQL COMMAND TO EXECUTE
{
CREATE TABLE [Ice].[Widget_c] (
[SysRevID] timestamp NOT NULL ,
[SysRowID] uniqueidentifier NOT NULL CONSTRAINT [DF_Widget_c_SysRowID] DEFAULT CONVERT([uniqueidentifier],CONVERT([binary](10),newid(),0)+CONVERT([binary](6),getutcdate(),0),0),
)
ALTER TABLE [Ice].[Widget_c] ADD CONSTRAINT [PK_Widget_c] PRIMARY KEY CLUSTERED ([SysRowID] ASC) WITH (ALLOW_PAGE_LOCKS = OFF) ON [PRIMARY]
}
SQL COMMAND TO EXECUTE
{
DECLARE @Service_SystemCode [nvarchar](8);
DECLARE @Service_Name [nvarchar](30);
SELECT @Service_SystemCode = bd.SystemCode, @Service_Name = bd.ClassName
FROM Ice.ZSubDataSet sds
JOIN Ice.ZBODataSets bds ON bds.DataSetSystemCode = sds.SystemCode AND bds.DataSetID = sds.ParentDataSetID
JOIN Ice.ZBODef bd ON bd.SystemCode = bds.SystemCode AND bd.ClassName = bds.ClassName
WHERE sds.DataTableSystemCode = N'ICE' AND sds.DataTableID = N'Widget_c'
AND bd.ClassType = 'UD';
UPDATE dt
SET dt.TableType = 'DB',
dt.SchemaName = N'Ice',
dt.DBTableName = N'Widget_c'
FROM Ice.ZBODataSets bds
JOIN Ice.ZSubDataSet sds ON sds.SystemCode = bds.DataSetSystemCode AND sds.ParentDataSetID = bds.DataSetID
JOIN Ice.ZDataTable dt ON dt.SystemCode = sds.DataTableSystemCode AND dt.DataTableID = sds.DataTableID
WHERE bds.SystemCode = @Service_SystemCode
AND ClassName = @Service_Name
AND IsListDataSet = 1
AND IsPrimaryTable = 1
}
SQL COMMAND TO EXECUTE
{
EXEC [Ice].[ZDBCreateChangeCaptureTrigger] N'Ice', N'Widget_c'
}
SQL COMMAND TO EXECUTE
{
EXEC [Ice].[SyncColumnAttribute] N'Ice', N'Widget_c'
}
Generating: C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Ice.Data.Model\IceContext.edmx
Connecting to server/database: <dBServer>\EPICOR19/Kinetic-2022-2-Test2
connection opened and DB info retrieved. (2.23 s)
Generate EDMX
generate EDMX completed. (0.08 s)
Process extended tables
process of extended tables completed. (0.01 s)
Saving EDMX
save completed. (0.04 s)
Transform Model T4 template
transformation completed. (7.28 s)
Transform TempRowTypes T4 template
transformation of TempRowTypes completed. (0.42 s)
Build context project
Determining projects to restore...
Restored C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Ice.Data.Model\Ice.Data.Model.csproj (in 316 ms).
MSBuild version 17.3.2+561848881 for .NET
Determining projects to restore...
Restored C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Ice.Data.Model\Ice.Data.Model.csproj (in 270 ms).
C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Ice.Data.Model\IceContext.Model.cs(1999,51): warning CS0618: 'IceDataContext.IceDataContext(EntityConnection)' is obsolete: 'Not compatible with Entity Framework Core.' [C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Ice.Data.Model\Ice.Data.Model.csproj]
C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Ice.Data.Model\IceContextImpl.cs(73,13): warning CS0618: 'IceContextImpl.IceContextImpl(EntityConnection)' is obsolete: 'Not compatible with Entity Framework Core.' [C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Ice.Data.Model\Ice.Data.Model.csproj]
C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Ice.Data.Model\IceContextImpl.cs(78,13): warning CS0618: 'IceContextImpl.IceContextImpl(EntityConnection, bool)' is obsolete: 'Not compatible with Entity Framework Core.' [C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Ice.Data.Model\Ice.Data.Model.csproj]
Ice.Data.Model -> C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator\Deployment\Server\Assemblies\Ice.Data.Model.dll
Build succeeded.
C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Ice.Data.Model\IceContext.Model.cs(1999,51): warning CS0618: 'IceDataContext.IceDataContext(EntityConnection)' is obsolete: 'Not compatible with Entity Framework Core.' [C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Ice.Data.Model\Ice.Data.Model.csproj]
C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Ice.Data.Model\IceContextImpl.cs(73,13): warning CS0618: 'IceContextImpl.IceContextImpl(EntityConnection)' is obsolete: 'Not compatible with Entity Framework Core.' [C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Ice.Data.Model\Ice.Data.Model.csproj]
C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Ice.Data.Model\IceContextImpl.cs(78,13): warning CS0618: 'IceContextImpl.IceContextImpl(EntityConnection, bool)' is obsolete: 'Not compatible with Entity Framework Core.' [C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Ice.Data.Model\Ice.Data.Model.csproj]
3 Warning(s)
0 Error(s)
Time Elapsed 00:00:14.63
build project completed. (18.33 s)
Total generation time (28.39 s)
Copying generated assembly to database: C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator\Deployment\Server\Assemblies\Ice.Data.Model.dll
Generating: C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Erp.Data.910100\ErpContext.edmx
Connecting to server/database: <dBServer>\EPICOR19/Kinetic-2022-2-Test2
connection opened and DB info retrieved. (7.57 s)
Generate EDMX
generate EDMX completed. (0.52 s)
Process extended tables
process of extended tables completed. (0.02 s)
Saving EDMX
save completed. (0.28 s)
Transform Model T4 template
transformation completed. (27.05 s)
Transform TempRowTypes T4 template
transformation of TempRowTypes completed. (3.82 s)
Build context project
Determining projects to restore...
Restored C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Erp.Data.910100\Erp.Data.910100.csproj (in 241 ms).
MSBuild version 17.3.2+561848881 for .NET
Determining projects to restore...
Restored C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator\Source\Server\Db\Erp.Data.910100\Erp.Data.910100.csproj (in 295 ms).
Erp.Data.910100 -> C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator\Deployment\Server\Assemblies\Erp.Data.910100.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:41.39
build project completed. (45.06 s)
Total generation time (84.31 s)
Copying generated assembly to database: C:\Users\<User>\AppData\Local\Temp\Epicor\DataModelGenerator\Deployment\Server\Assemblies\Erp.Data.910100.dll
Checking for orphans
Data Models generated successfully: 3/21/2023 7:45:40 PM
Okay the toher thing I’ve seen is that UX “thinks” is out of sync if two things are different, either the name or the data type. I wonder if you are losing / adding some precision somewhere. Let me look at it on my 2022 version stand by.
I’ve dealt with that the last two times I added UD fields during our weekend maintenance after we upgraded to 2022.2.8. Fun on a Sunday night 10pm when you thought you’d be done in 20 minutes and 90 minutes later you’re still regenerating for the 5th time, stopping/starting/recycling, and trying out all the app servers.
I think it’s a fake artifact, since our other 2 app servers show it’s in sync (when I log on & access UD column maint) by changing the config file app server), so the DB must be fine.
My process is to add the UD field on AppServer1, then stop all 3 app servers, regen the db (on appserver’s 1 Epicor Admin Console), then start the app servers on App 1 (which now starts App2 and 3 about a second later). Then log in to each environment and verify the sync was successful in UD Column Maint.
It seems to fix itself after a while (maybe the following week’s server maintenance gets everything caught back up).