Create a Read Only User on SQL Server 2005

  • Is there a script which will allow me to create ReadOnly user on sql server.

    This user should be able to read all the tables, its contents, stored procedures , functions (all the objects).

    It should also have access to execute all the stored procedures functions etc.

    thanks

  • see this post that i did recently on creating a read only user that also could EXECUTE procs and functions;

    http://qa.sqlservercentral.com/Forums/Topic1084522-5-1.aspx#bm1084563

    what you are asking is exactly the same, with one more privilege to the Role: you want them to read the text/definitions of the procedures, right?

    all you would do is add the VIEW ANY DEFINITION to the role you see in that example:

    GRANT VIEW ANY DEFINITION TO [ReallyReadOnly]

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

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

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