Hi all, Basically I will enter the login and password from the application and in turn it will check for the table in SQLServer 2005 of that particular database, by checking whether the given user name is exists in that table, if it is available it will allow to login into the application. Here I wish to make a audit whenever a record is being accessed from that table. Is there any possibility to check whether the row has been accessed or not. Or given me some other options how to audit? Thanks All. Regards, Muralikumar.
I'd suggest setting up permissions the normal way - grant database access only to specific logins or specific Windows groups, create specific database roles, assign permissions only to those roles, and assign logins only to those specific roles/Windows groups. Application then only has to try to logon - if login has no permissions then the logon attempt will simply fail.
Thanks for your reply Adriaan.. But here I want to audit who has access that particular table at a particular period of time. Is there any way to check it. Thanks...
There is no such thing as a "select trigger", so the easiest alternative is by giving access only through stored procedures - just include code to log the fact that the user is accessing the data.
IF its SQL 2008 then AUDITing in SSMS could help here, but its 2005 so http://weblogs.asp.net/jgalloway/ar...sed-auditing-to-your-sql-server-database.aspx may help.