Ideal way to grant read write execute to few logins

NeophyteSQL 241 Reputation points
2021-02-25T05:50:59.57+00:00

We are planning on creating 4 service accounts which need read write execute permission What wud be the ideal way Is it better to implement through roles Please guide and thanks for ur help

SQL Server | Other
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Olaf Helper 47,516 Reputation points
    2021-02-25T07:01:48.683+00:00

    Hello,

    Service accounts for the SQL Server services like database engine? Then see Configure Windows Service Accounts and Permissions

    0 comments No comments

  2. NeophyteSQL 241 Reputation points
    2021-02-25T14:28:45.07+00:00

    I am not talking about these service accounts

    the logins that we will be creating are used by applications to connect to sql server

    0 comments No comments

  3. Olaf Helper 47,516 Reputation points
    2021-02-25T14:55:18.613+00:00

    For read/write access you can add then to the database role db_datareader

    The better option is to create an own database role, grant required permissions for the role and add the database user to that role.


  4. AmeliaGu-MSFT 14,006 Reputation points Microsoft External Staff
    2021-02-26T08:50:29.453+00:00

    Hi NeophyteSQL,

    You can add the database user to the membership of db_datareader and db_datawriter.
    For example:

    USE [DB]  
    GO
    ALTER ROLE db_datareader ADD MEMBER <user>;  
    Go
    ALTER ROLE db_datawriter ADD MEMBER <user>;  
    Go
    

    Best Regards,
    Amelia

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.