Regenerate Data Model Error

Got this:
image

That table does exist correct? Can you verify this?

It doesn’t exist under SQL Management, but when I check Extended UD Table Maintenance it’s in there… Of course it does say “Table not in database” though since I’m not able to regen the data model.

Yikes. Did you have that table in your environment before or did you just create it?

I just created it and then went to regen the data model and got the error…

You might be able to see more detail within the SQL server logs themselves, or in the Event logs for Epicor.
T

What version of E10 are you running? In 10.0 Re-Synch table usually worked for me before doing data model regen

In ~10.1 the second step of ‘Sync DB’ in the UI was moved into the Regen DM process - one less step to forget.

It smells like the regen process is failing and not creating the db table. That should be in the event log or in the file log (I thought that was shown during an error).

There isn’t any data in the table yet, right? You could try deleting it and recreating it (after verifying there’s no data). We had a regeneration problem related to a UD field about a year ago-- I don’t remember the specific error message, but deleting it (it was empty) and recreating it fixed the issue for us.

Does the user have access rights to the database table creation?

Possibly random question but what’s the default schema set to for the user you’re running the data model regeneration as?

I believe there’s a log that will show where it’s failing. I’ll have to poke around to see if I can remember where it is, typically the eventlog is my go to.

I would assume that I have the correct permissions if I can create tables in Prod/Pilot with no issues… Should I try doing it as the manager user or something?

Update - I deleted and re-added and still got the same error. After I deleted I regen’d the data model to see if I would get an error but it succeeded… Then I re-added the InvcHead_UD table and regen’d and got the same error

What version are you in?

Permissions may not be the issue. What I found the hard way was that if you don’t have the default schema for your database user on that database set to DBO then it will create the table under your default schema for your user.
I ended up with a table called ‘domain\username.partprice’ and it threw errors when trying to create the view to join the two tables together.

10.1.400.13

This is correct, right?
image

Yeah, that looks correct.

do you have the log file from here: C:\Users<your user name>\AppData\Local\Temp\Epicor\DataModelGenerator\DataModelGenerator.log.

That will have what it’s trying to execute.

2 Likes

Yep here’s the contents of the file -

Start time: 1/9/2018 9:50:43 AM
Database server: EPICORSQL
Database name: E10_Dev
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\clonge\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\clonge\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.InvcHead_UD

So the “At least one user defined column must be defined.” line led me to believe that I needed to add a column in the new InvcHead_UD table. Now I added the column and regen’d and it successfully went through…

Whoops

1 Like

Yeah, that would cause it to fail.
Glad it helped.