Hi friends
I have come across a weird issue in NAV classic SP1 environment.
Two DB users have got deleted from the system, I am not able to identify, when it was done, who has done it etc.
Is there any way to identify the changes that happened to the user records?
Thanks
Karthick
*This post is locked for comments
I´ve added a hyperlink to the original post to link to a stored procedure where you can get the value back :)
Thank you so much for all the inputs and time spent on this. I had no choice except creating the same user again and moved on.
Tobias - thanks for the detailed input, but unfortunately i am not able to retrieve any value. Will keep this in handy .
thanks once again
Hi Karthick,
If the transaction log of your SQL-NAV-Database still exists you can run the following statement to see the "delete" tracking of your User table. Unfortunately you cannot see directly which data has been deleted as this is stored in binary form within the Transaction Log. If you need this Information in addition you can ask your SQL Server Admin to analyze the Row Content in detail for further Information which content has been deleted.
SELECT deletes.AllocUnitName,deletes.Operation,l.[Begin Time],u.name
FROM fn_dblog(NULL, NULL) l
INNER JOIN ( SELECT [Transaction ID],AllocUnitName,[RowLog Contents 0],Operation
FROM fn_dblog(NULL, NULL) deletes2
WHERE (AllocUnitName = 'dbo.User.User$0' -- Database Login
OR AllocUnitName like 'dbo.$ndo$usrproperty%') -- Windows Login
AND Operation = 'LOP_DELETE_ROWS') deletes ON deletes.[Transaction ID] = l.[Transaction ID]
INNER JOIN Master..sysusers u ON Convert(varchar(64),u.[sid],1) = Convert(varchar(64),[Transaction SID],1)
WHERE l.Operation = 'LOP_BEGIN_XACT';
But for your purpose it should fit to see when the user table has been touched for deletion and which user run the statement. For analyzing the binary content here´s an additional link:
rusanu.com/.../how-to-read-and-interpret-the-sql-server-log
In addition you can use the really helpfull stored procedure described in the following link.
(credits to Muhammad Imran)
http://raresql.com/2011/10/22/how-to-recover-deleted-data-from-sql-sever/
Best regards,
Tobias
Hi Sandeep
Thanks for the input, it is not possible to find out in NAV, but is there any other workaround or any other method in SQL to find the log?
Thanks
Karthick
Hi karthick
I think, there is no way to achieve this one. You just contact you system admin if everybody don't have super permission.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156