How to auto detect row version, if some one update manually
-
Hi guys, I am looking for the best ways to create an api which will monitor the database table row version. if this api found any row update manually (i.e., directly login to SQL server) than it will send an acknowledgement with the following information: (1) LogIn detail of the data server. (2) Access database name with datatime. (3) Affected table name, row version and row number as well. I will be glad for your any suggestion / ides on that.
Thanks Md. Marufuzzaman
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
-
Hi guys, I am looking for the best ways to create an api which will monitor the database table row version. if this api found any row update manually (i.e., directly login to SQL server) than it will send an acknowledgement with the following information: (1) LogIn detail of the data server. (2) Access database name with datatime. (3) Affected table name, row version and row number as well. I will be glad for your any suggestion / ides on that.
Thanks Md. Marufuzzaman
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
-
I currently use
HOST_NAME()
and
APP_NAME()
in a trigger for insert, update and delete to monitor for anything that wasn't supposed to happen. You can then include any of the detail from INSERTED and DELETED tables as well as connection info. HTH
Hi, Thanks for the replay, well if we consider the scenario given below: if any user: 1. logIn to the database -> open the table in design mode--> block the trigger. 2. Update a single column value. 3. Unblock the trigger - > Save the table. I am thinking on how could I detect the changes from my C# application. Thanks once again for your valuable input.
Thanks Md. Marufuzzaman
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
-
Hi, Thanks for the replay, well if we consider the scenario given below: if any user: 1. logIn to the database -> open the table in design mode--> block the trigger. 2. Update a single column value. 3. Unblock the trigger - > Save the table. I am thinking on how could I detect the changes from my C# application. Thanks once again for your valuable input.
Thanks Md. Marufuzzaman
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
I think your app would need to hold a copy of the table and constantly compare, and I doubt that's worth the trouble, so don't bother trying. You can't protect against a malicious authorized user. There are also times when you legitimately want to correct some data and make it appear to have always been correct. In my opinion, an app should never hold onto data for longer than it needs it; when it needs the data again it should query it again.
-
Hi guys, I am looking for the best ways to create an api which will monitor the database table row version. if this api found any row update manually (i.e., directly login to SQL server) than it will send an acknowledgement with the following information: (1) LogIn detail of the data server. (2) Access database name with datatime. (3) Affected table name, row version and row number as well. I will be glad for your any suggestion / ides on that.
Thanks Md. Marufuzzaman
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.