RE: GRANT Select to all tables on a DB

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Sam (Sam_at_discussions.microsoft.com)
Date: 10/13/04


Date: Wed, 13 Oct 2004 15:27:01 -0700

Thank you, thank you, thank you.
That is exactly what I was looking for.

sam

"SangHunJung" wrote:

> Sam,
> For all tables in one DB, for example,pub db
> use pub
> go
> sp_msforeachtable 'grant select on ? to RO'
>
> For all DBs, sp_msforeachdb will do.
>
> Cheers,
> SangHunJung
> "Sam" wrote:
>
> > I have three main database files on a SQL 2000 server. Each database has
> > about 200 tables. I need the ability to easily give a user SELECT for all
> > tables in each database. I can use the GUI, but it takes way too long. Please
> > help me figure out an easy way to enumerate all tables in the database, so I
> > can construct a GRANT Select statement.
> > Thanks.
> > S



Relevant Pages

  • RE: GRANT Select to all tables on a DB
    ... Are there similar commands to iterate through all the Stored Procs on a ... Sam ... "SangHunJung" wrote: ... >> tables in each database. ...
    (microsoft.public.sqlserver.server)
  • Re: Alter Many Stored Procedures
    ... The group needs to be a member of the db_owner or db_ddladmin fixed database ... "SangHunJung" wrote in message ... > What permission do I need to setup for a developer in order to change many ... Developer windows group is added to ...
    (microsoft.public.sqlserver.security)
  • RE: GRANT Select to all tables on a DB
    ... For all DBs, sp_msforeachdb will do. ... "Sam" wrote: ... > tables in each database. ... > can construct a GRANT Select statement. ...
    (microsoft.public.sqlserver.server)