locked
SQl Server DB permission RRS feed

  • Question

  • Hi I need to grant permission to user on financial  DB.  requested  permission is to view & execute stored proc & function. I am not sure by giving all executable permission may impact "data" change on this.  But not sure lot of procedures and functions in DB and some of them may change data by executing them. Could any one advise on this how to grant privilege on no change data.   

    • Moved by Olaf HelperMVP Saturday, January 20, 2018 4:37 AM Moved from "Database Engine" to a more related forum
    Thursday, July 20, 2017 11:36 PM

Answers

  • Hello,

    When you grant execute permission for a stored procedure, the the procedure does what it should do, it runs and may add, modify or delete data. Review the SP code to see what it do.


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    • Marked as answer by Olaf HelperMVP Saturday, January 20, 2018 4:37 AM
    Friday, July 21, 2017 5:47 AM

All replies

  • Hello,

    When you grant execute permission for a stored procedure, the the procedure does what it should do, it runs and may add, modify or delete data. Review the SP code to see what it do.


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    • Marked as answer by Olaf HelperMVP Saturday, January 20, 2018 4:37 AM
    Friday, July 21, 2017 5:47 AM
  • USE [tt] -- DBNAME
    GO
    CREATE ROLE [db_execute] -- Creating DB roles
    GO
    use [tt] -- DBNAME
    GO
    GRANT EXECUTE ON [dbo].[test] TO [db_execute] -- test is my Storeproceure
    GO 

    Based on the store procedures you need to provide either seleclt, write, ddl etc etc 


    Thanks, Satish Kumar. Please mark as this post as answered if my anser helps you to resolves your issue :)

    Friday, July 21, 2017 8:07 AM