Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2006
    Posts
    119

    Unanswered: Setting up a read only user

    Hi,
    Simple question time.

    I have a database instance which of course I can connect to and edit data. I would like to set up other users for this database that can just as easily connect but that only read data? What is easiest, quickest way? Thanks.

    Alex.

  2. #2
    Join Date
    Jan 2012
    Posts
    2

    Read only database?

    Hello,

    It is my idea:
    1.) Modify database to readonly true.
    2.) Create full backup from the database.
    3.) Restore a new database from the backup.
    4.) Modify data in the new database.
    5.) Create full backup from the new database.
    6.) Restor old database from the newest backup.
    7.) Modify database to readonly false.

  3. #3
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    You can either add the user(s) to the db_datareader role in the database, or grant select permission on the schema.

  4. #4
    Join Date
    Jan 2012
    Posts
    2
    Deleted my post.

  5. #5
    Join Date
    Jan 2006
    Posts
    119
    Quote Originally Posted by salliven View Post
    Deleted my post.
    Ok thanks. There's plenty on the web around user roles... e.g. Understanding roles in SQL Server security | TechRepublic

    I am wondering if anyone knows what SQL query I can run to check user roles?

    Thanks.

  6. #6
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    sp_helpuser

  7. #7
    Join Date
    Jan 2006
    Posts
    119
    Quote Originally Posted by MCrowley View Post
    sp_helpuser
    Thanks for everything.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •