June 22, 2012 at 1:14 am
Hi
In My Organization we are planned to imlement a role based security.I created a one role . Role name is called "Developer".Under this role i created two users.I use follwing Statement.
Step 1 : Create the Role
CREATE ROLE [Evaluationrole]
Step 2:
GRANT insert to Evaluationrole
GRANT update to Evaluationrole
GRANT delete to Evaluationrole
Step 3:
Grant create stored Procedure to Evaluationrole
GRANT EXECUTE TO Evaluationrole
GRANT VIEW DEFINITION TO Evaluationrole
Step 4:
USE [master]
GO
CREATE LOGIN [dvsuser] WITH PASSWORD=N'dvsuser', DEFAULT_DATABASE=[master], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
GO
Step 5 :
CREATE USER [dvsuser] FOR LOGIN [dvsuser]
EXEC sp_addrolemember N'Evaluationrole', N'dvsuser'
Here in this user Create stored Procedure and execute the stored procedure every thisk working file. but I am facing Problem in Trigger. For Example Any table I am having "Delete" trigger means, that time that table records not allow to delete the records. I am facing follwing Error
The user does not have permission to perform this action. I am Using Following trigger
/****** Object: Trigger [dbo].[Audit_updateAuthor_Locking_Details] Script Date: 06/22/2012 12:43:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
Create Trigger [dbo].[Audit_updateAuthor_Locking_Details] ON [dbo].[Author_Locking_Details] FOR UPDATE AS
BEGIN
SET NOCOUNT ON
DECLARE @IP varchar(20)
SELECT @IP=client_net_address FROM sys.dm_exec_connections WHERE session_id = @@SPID
INSERT into AUDIT_Author_Locking_Details SELECT 'Updated','Old',getdate(),user_name(), @IP,* FROM Deleted
END
Please Give me a solution . I want this user execute the trigger also.
Thank You...
June 22, 2012 at 1:41 am
Please don't cross post. It just wastes peoples time and fragments replies.
No replies to this thread please. Direct replies to: http://www.sqlservercentral.com/Forums/Topic1319084-359-1.aspx
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 22, 2012 at 1:44 am
No Brother ,,,Its secrity related Question only....
June 22, 2012 at 7:46 am
vs.satheesh (6/22/2012)
No Brother ,,,Its secrity related Question only....
The point is that you have a thread trying to resolve this already. If you just start a new thread it fragments the answers and you don't get a solid solution. Now if you can go back to the other thread we can try to resolve this. 😉
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply