I would like to create an SQL Azure user and grant her read-only access on a handful of DBs, what script can I use to achieve this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A pure TSQL script is super messy, SQL Azure disables the
USEcommand, so you are stuck opening connections to each DB you need to give the user read access.This is the gist of the pattern.
In Master DB:
In each target DB (requires a separate connection)