How to script users with permissions SQL Server?
permission_name + SPACE(1) + SPACE(1) + 'TO' + SPACE(1) + QUOTENAME(USR.name) COLLATE database_default + CASE WHEN DBP. state <> 'W' THEN SPACE(0) ELSE SPACE(1) + 'WITH GRANT OPTION' END + ';' FROM sys. database_permissions AS DBP INNER JOIN sys. database_principals AS USR ON DBP.
How do I give permission to SQL Server user?
Using SQL Server Management Studio
Right-click a stored procedure and select Properties. In the Stored Procedure Properties -stored_procedure_name dialog box, under select a page, select Permissions. Use this page to add users or roles to the stored procedure and specify the permissions those users or roles have.