Configuring User Permissions for SQL Server Management Studio

Asked 2 years ago, Updated 2 years ago, 76 views

I would like to set up a login user in SQL Server Management Studio to run a stored procedure, but not to change it or view the source code of the procedure. Which role should I set and change?
Please let me know.

sql-server

2022-09-30 21:43

1 Answers

To grant users permission to execute a specific stored procedure.

GRANT EXECUTE ON dbo.procname TO username;

To create a role with execution privileges.

CREATE ROLE ROLENAME;
GRANT EXECUTE TO ROLLENAME;
ALTER ROLE ROLENAME ADD MEMBER username;


2022-09-30 21:43

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.