Wednesday, 30 March 2016

Grant Create Function or Procedure in SQL DB for a user/role

1) Grant permission for a user/role to create function in DB
 
GRANT CREATE FUNCTION TO [user/role]]
    GO


2) Grant select and DRI(Declarative Referential Integritypermission on a user define function in sql.

GRANT  SELECT, REFERENCES  ON [dbo].[func name]  TO [user/role]
    GO

Note:-DRI permission is required when function written type is data table 

No comments:

Post a Comment

SQL Table : Change Row As Column and Group Them... ( Setting column values as column names in the SQL query result )

Setting column values as column names in the SQL query result Problem Statement : id col1 col2 1 Pending 30 1 Resolved 48 ...