Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Table Access Control Expand / Collapse
Author
Message
Posted Tuesday, August 06, 2013 1:32 AM
UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Wednesday, December 18, 2013 5:03 AM
Points: 1,454, Visits: 135
I am trying to control the table access permission using trigger based on application, but system is throwing error message.

Here is the code

CREATE TRIGGER [Tr_ServerLogon]
ON ALL SERVER FOR LOGON
AS
BEGIN
declare @appname VARCHAR(512)
SET @appname = APP_NAME()

if ('.Net SqlClient Data Provider'=@appname)
GRANT DELETE ON [ArgonSar].[dbo].[customerMaster] TO [weaveit]
else
DENY DELETE ON [ArgonSar].[dbo].[customerMaster] TO [weaveit]


END
GO

Please suggest me, what I should do.


  Post Attachments 
Error Msg.JPG (5 views, 28.87 KB)
Post #1481188
Posted Monday, August 12, 2013 1:42 AM
UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Wednesday, December 18, 2013 5:03 AM
Points: 1,454, Visits: 135
No Suggestions?
.
Post #1483163
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse