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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Someone ran delete records utility

(0) ShareShare
ReportReport
Posted on by 5

we have lost years of transactional data from our GP 2018 company.  my 3rd party (who have been actively working on launching WMS and Manufacturing modules in the backgroud) says one of my staff must have run the Utility - delete records,,,, which none of my staff even remotely know how to do.

questions

- can you recover the data?

- can you identify when that utility was run, and by which user?

- is it possible something my 3rd party IT group was doing in the background - they could have accidentally removed the records / tables

help :)

Categories:
I have the same question (0)
  • Richard Wheeler Profile Picture
    75,848 Moderator on at
    RE: Someone ran delete records utility

    Do you  have a backup that you can restore to a test company? You could then run scripts looking for missing DEX_ROW_ID values in the tables in question. I just went through this with another client. First, find out what is missing and then start asking who did the deleting.

  • Gavin Profile Picture
    2,502 on at
    RE: Someone ran delete records utility

    Hi,

    In addition to this a few years ago I had to find out who had deleted a batch in Dynamics GP and wrote this blog on how this can be achieved in SQL.

    thedynamicsexplorer.com/.../

    You just need to know one of the tables that data was deleted from and plug it into one of the scripts.

    Hope this helps.

    Thanks

    Gavin

  • Suggested answer
    Derek Albaugh Profile Picture
    on at
    RE: Someone ran delete records utility

    Backups would be the only thing we would have as far as getting data back.

    As far as who ran the delete, it looks like the Community has some options for that.

    Let us know if you have any questions.

    Thanks

  • Mala1982 Profile Picture
    5 on at
    RE: Someone ran delete records utility

    thanks Gavin, very helpful, so our current system has been running in Simple Mode - do you mean we just need to switch this over to recovery mode and then run the diagnostics, or does your system have to already be in Recovery Mode for this to have worked ..... so are we too late to find this 'who done it' information at this point in time?

  • Gavin Profile Picture
    2,502 on at
    RE: Someone ran delete records utility

    Hi,

    Unfortunately if the database is in the "Simple" recovery model the transaction log is reused when a SQL transaction commits. (an SQL transaction like a DELETE operation). Therefore you can't use the method I describe to find out I'm afraid.

    Thanks

    Gavin

  • Richard Wheeler Profile Picture
    75,848 Moderator on at
    RE: Someone ran delete records utility

    Do you  have a backup that you can restore to a test company? You could then run scripts looking for missing DEX_ROW_ID values in the tables in question. I just went through this with another client. First, find out what is missing and then start asking who did the deleting.

  • Richard Wheeler Profile Picture
    75,848 Moderator on at
    RE: Someone ran delete records utility

    Not all tables have a column USER2ENT or USWHPSTD so there would be no way to tell who deleted these records regardless of the recovery method used. You would need something like FastPath to be running. The simplest way is to restore a backup to another database and then start comparing database. The horses have already left the barn in this case but going forward it would help to start restricting user access by assigning roles to users.

  • Gavin Profile Picture
    2,502 on at
    RE: Someone ran delete records utility

    Hi Richard,

    The method I describe in my blog doesn't need the USER2ENT or USWHPSTD fields to be present in the tables to find out who deleted the records from the database. The SQL transaction log stores the SQL User ID who issued the DELETE operations on the SQL database. Therefore you can query the SQL Transaction Log to find out which SQL User ID deleted the data. (assuming the SQL database is in the FULL recovery model)

    Technically you can use this method to find out which SQL User ID deleted data from any SQL database, it doesn't have to be a Dynamics GP SQL database.

    Thanks

    Gavin

  • Richard Wheeler Profile Picture
    75,848 Moderator on at
    RE: Someone ran delete records utility

    I usually do not employ Full Recovery unless the user is ready to maintain point-in-time restores. Then they would be performing transaction log backups.

    In an ideal world Full Recovery is the way to go. But with small databases just running full backups every few hours is sufficient.

    I do like your idea however. That is good to know.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,004

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 582 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans