I would like to stop power users from deleting data using SQL Server Management Studio. I need to archive data and add some info to the audit trail when data gets deleted.
- Is there a way to stop them when they attempt to delete the data from SSMS?
- Is there a way to know which process caused the deletion? such as from SSMS, application, stored proc?
- Is there a way to allow only deletes from Stored Procedure?
Thanks
Create a new login and database user for this login. Then grant delete permission to this user, and revoke it from all others. Write procedure[s] that removes data, add
WITH EXECUTE AS [previously created user that can delete data]. Grant other users with execute permissions to the procedure[s].