Are GRANT's required in SQL

GRANT EXECUTE ON [schema].[spname] TO ?????
Help appreciated, do we just add a grant to the specific schema?
 
Parents Reply
  • After further analyzing the issue, we are assigning the correct permissions in our hosting environment already.  TE-19687 has been closed.  You will not need to grant exec permission when installing your plugins.  In your own environment or in an on-premise environment, you will be responsible for assigning the plugin user account the correct permissions.  The following permissions should work:

    ALTER USER [{NewUser}] WITH DEFAULT_SCHEMA = [{pluginSchema.Schema}];
    
    GRANT SELECT ON SCHEMA::[Api] TO [{NewUser}]; -- To access the permissions view
    
    GRANT SELECT, INSERT, UPDATE, DELETE, EXECUTE, ALTER ON SCHEMA::[{pluginSchema.Schema}] TO [{NewUser}];
    
    GRANT CREATE TABLE, CREATE VIEW, CREATE FUNCTION, CREATE PROCEDURE, CREATE TYPE, CREATE SYNONYM TO [{NewUser}];

Children
  • This is basically what we created which is pretty much the same

    CREATE LOGIN developer WITH PASSWORD = 'StrongSecurePassword123!';
    GO
    
    USE community_app;
    GO
    
    CREATE USER developer FOR LOGIN developer;
    GO
    
    CREATE SCHEMA dev AUTHORIZATION [developer];
    GO
    
    ALTER USER [developer] WITH DEFAULT_SCHEMA = [dev];
    GO
    
    GRANT SELECT ON SCHEMA::[Api] TO [developer]; -- To access the permissions view
    GO
    
    GRANT SELECT, INSERT, UPDATE, DELETE, EXECUTE, ALTER ON SCHEMA::[dev] TO [developer];
    GO
    
    GRANT CREATE TABLE, CREATE VIEW, CREATE FUNCTION, CREATE PROCEDURE, CREATE TYPE, CREATE SYNONYM TO [developer];
    GO