web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How to Regenerate Staging Table

(0) ShareShare
ReportReport
Posted on by 903

Hi,

If we delete physical object of staging table in SQL, can we generate it again in Visual studio ?

I delete it, but in Visual Studio project still there, but failed on Synchronize table. I tried to open Data Entity and right cilck to Regenerate Staging Table option, it didn't do anything.

Thanks,

I have the same question (0)
  • Verified answer
    Mea_ Profile Picture
    60,286 on at

    You need to cleanup record in sqldictionary table, first find table id by entity name and then delete all records with this table id from it. 

  • Tony zhong Profile Picture
    903 on at

    Hi where can I find this table ?

  • Sukrut Parab Profile Picture
    71,741 Moderator on at

    You can query  this table using SQL server management studio on dev VM.

  • Tony zhong Profile Picture
    903 on at

    Hi Sukrut,

    Well, 1st of all, I deleted it from SQL management studio. In hope, Visual Studio will recreate it, but it did not.

    So I go to Regenerate Staging, while actually I can see the staging table object in my Project, even I can see it in AOT. But nothing happened,

    Thanks,

  • Tony zhong Profile Picture
    903 on at

    Hi Sukrut,

    Did you mean the sqldictionary table ? ok so can advice how am I going to find it ?

    Thanks,

  • Martin Dráb Profile Picture
    240,312 Most Valuable Professional on at

    "Regenerate staging table" generates application objects, therefore it's not related to your problem.

    The process that reads application objects and creates corresponding elements in database is database synchronization.

    Yes, Sukrut was answering your question about where you can find SqlDictionary table.

  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,097 on at

    Hi Tony

    If you run full sync. from VS you will see the message in the log from DroppedTableValidator with the list of tables. The log message has information about SQL stored procedure which should fix the issue: EXEC SP_REMOVETABLE "table_name". It will do the same steps as Ievgen mentioned in the first post. After you run this stored procedure in SQL you need to perform sync. operation in VS.

    BR, Sergey

  • Blue Wang Profile Picture
    Microsoft Employee on at

    Hi Tony,

    When you manually delete the staging table in SQL, you return to VS, you can Regenerate Staging Table, and then it will appear in your project. But at this time, database errors will be synchronized, I think this should be the difficulty encountered.

    -

    My solution is to manually create a staging table with the same name through a statement in SQL, and add the required fields of not null, then you can synchronize the database normally, build project.

    -

    Take my table MySelectTable as an example, when you delete MySelectTableStaging, regenerate it in VS, and then create it through SQL statements, and add some not null fields?

    02732.PNG

  • Tony zhong Profile Picture
    903 on at

    Hi Martin,

    Thanks for more information. But the synchronization is failed because probably the "physical" table is deleted. So it is confusing, what should I do first ?

    The Application object as you're saying, is still there and correct the way I see it, but now the table in database is gone. Build is completed but Synchronize is failed. When it is failed, it won't create any object in SQL DB it self, am I right to say that ?

    Btw I found the SQLDictionary table, so as advised, I must delete the field id record (rows) of that table ?

    Thanks,

  • Martin Dráb Profile Picture
    240,312 Most Valuable Professional on at

    Yes, I understand your situation, I was just explaining why regenerating staging table can't fix your problem.

    You've already got replies explaining what you should do.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288 Super User 2026 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 276 Most Valuable Professional

#3
Anton Venter Profile Picture

Anton Venter 225 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans