x
login about faq Site discussion (meta-askssc)

granting read access to databases in sql server 2000

hello all,

i am having 300 databases in which i have to grant read access to all,How to grant read access to all databases in Sql Server 2000 please suggest

more ▼

asked Mar 06 '12 at 01:22 PM in Default

sand143eep gravatar image

sand143eep
541 4 12 23

hello sorry to ask 'youruser' in the sence username please correct if i am wrong

Mar 06 '12 at 01:59 PM sand143eep

yes it is the username

Mar 06 '12 at 02:02 PM robbin

thanks a lot Robbin it worked one small question is there any difference in public and datareader as the user was executed as datareader but he was provided with public through the script please suggest if possible.

Mar 06 '12 at 02:18 PM sand143eep

The public role is a special database role to which every database user belongs. The public role captures all default permissions for users in a database. It cannot have users, groups, or roles assigned to it because they belong to the role by default. It is contained in every database, including master, msdb, tempdb, model, and all user databases.

Mar 06 '12 at 02:33 PM robbin

Thanks Robbin once again for your detailed clarification.

Mar 06 '12 at 03:13 PM sand143eep
(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

The actual snippet is quite simple

USE yourdb
go
sp_addrolemember 'db_datareader', 'youruser'
go
more ▼

answered Mar 06 '12 at 01:42 PM

robbin gravatar image

robbin
1.6k 1 3 5

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x1834
x454

asked: Mar 06 '12 at 01:22 PM

Seen: 683 times

Last Updated: Mar 06 '12 at 03:13 PM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.