Application Error after copying Live DB to Test

I’ve copied the live DB to the production one a million times, without any issues. But this time after the copy, I get an error when launching Company Config (where I change the company name and disable tax connect) in the Test company.

Application Error

Exception caught in: Epicor.ServiceModel

Error Detail

Message: An error occurred while executing the command definition. See the inner exception for details.
Inner Exception Message: Invalid object name ‘Erp.Part_UD’.
Program: Epicor.ServiceModel.dll
Method: ShouldRethrowNonRetryableException

I can close error message, and everything else seems to run fine.

I do all sorts of testing and experimenting in the test company(UI customizations, UD fields, BPM’s etc …). None of that is retained after a DB restore, correct?

I’ve tried clearing the cache, but the error still persists.

Shot in the dark, but were there fields in Live that were added to the data model that weren’t added to Test?

1 Like

I thought about this, but wouldn’t all that be in the DB?

I think that if the versions don’t match, you may have to run the “Upgrade DB” in the Epicor Admin Console.

You still might have to run the regen for adding UD fields. We’ve had to do this before.

1 Like

I ALWAYS run the Regen Data Model and restart the Appserver immediately after I do the DB restore over my Test DB . To me it sounds like the Data Model and DB are not in synch

2 Likes

I think the data model is independent of the database. Since the APIs and such would be built off of the data model rather than the database, I think it would need to be synced and regenerated in order to work properly. I could be completely wrong tho

2 Likes

Regerating the data model seems to have fixed it.

Surprised this is the first time we’ve run into it.

1 Like