Data Reader and View Creator

  • How can I assign a SQL Server Login the security of being able to read data from a database and create views? I am relatively new to SQL Security and have been asked to figure this out.

    The users needs access to read data and create views within a multiple databases.

    Thank you in advanced for the assistance.

  • Using Query Analyser

    GRANT CREATE VIEW TO <user>

    GRANT SELECT ON <table> TO <user>

    -------------------------------------------------------------------------
    Normal chaos will be resumed as soon as possible. :crazy:

  • Thank you Grasshopper. This worked like a charm. Now, here is an additional request that I am puzzled with.

    User Request

    I am able to create views successfully. After starting work on this I also need authorization to create user-defined functions. SQLServer date/time fields need to be converted to the SAP format within the view. Rewriting this code over and over again per datafield in the view will be a maintenance headache, so I would like to create a user-defined function instead.

    Thank you in advance for this assistance.

  • The syntax would be:

    GRANT CREATE  FUNCTION TO <user>

    -------------------------------------------------------------------------
    Normal chaos will be resumed as soon as possible. :crazy:

  • Kind of figured that one as well. Thank you for your assistance.

     

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply