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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

delete data from inventTrans table on sandbox

(0) ShareShare
ReportReport
Posted on by

Hi All,

Every month we create new products and we don't use older products for any new transactions in the future.

InventTrans table has grown to 30GB in size and we want to delete the data from it on our staging environment. It's our top most table in terms of size.

pastedimage1630389203632v1.png

We want to delete data directly from SQL server if possible.

What is the best way to go for it? 

Appreciate your help. Thanks.

Regards,

Vikky

I have the same question (0)
  • huijij Profile Picture
    19,811 on at

    Hi Vikky,

    Is it a Tier1 environment?

  • Suggested answer
    Sheikh Sohail Profile Picture
    6,125 on at

    Hi

    You can connect any database except the production once and can delete the data directly from SQL.

    Important

    If you don't care about any circumstances in the staging environment, only then you can delete the data.

  • VRD Profile Picture
    on at

    Hi Soahil and Judy,

    Thanks for your response.

    Please note that I have access to SQL in the environment where we want to delete the data.

    My concern is what is the best way to delete data from InventTrans. Do I need to take care of deleting data from any related table or just deleting straight away from InventTrans table should be suffice?

    I will obviously want to delete the inventory transaction which are for older items that are no longer in use.

    You can assume this environment as developer's box.

    regards,

    Vikky.

  • Suggested answer
    Sheikh Sohail Profile Picture
    6,125 on at

    Hi Vikky

    It depends on your situation, if you don't work or open the old invoices or posted journal then you can directly truncate the tables. 

    if you don't delete the data from the reference table, then it will only make an impact on reports and reference fields.

  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,075 Super User 2025 Season 2 on at

    Hi Vikky,

    I do assume you want to delete the data only from a staging/UAT environment, but not production. To ensure data consistency, you can also use a new feature for archiving inventory transactions. Then delete the archived inventory transactions (InventTransArchive).

    You can read more about this new feature on my blog: Feature trial: Inventory transactions archive - Dynamicspedia

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 551 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans