RE: GRANT Select to all tables on a DB
From: Sam (Sam_at_discussions.microsoft.com)
Date: 10/13/04
- Next message: David Gugick: "Re: Optimizer not using the good index"
- Previous message: Sam: "RE: GRANT Select to all tables on a DB"
- In reply to: SangHunJung: "RE: GRANT Select to all tables on a DB"
- Next in thread: Dan Guzman: "Re: GRANT Select to all tables on a DB"
- Reply: Dan Guzman: "Re: GRANT Select to all tables on a DB"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 13 Oct 2004 15:35:05 -0700
Are there similar commands to iterate through all the Stored Procs on a
database, as well as all the views? Thank you again.
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
- Next message: David Gugick: "Re: Optimizer not using the good index"
- Previous message: Sam: "RE: GRANT Select to all tables on a DB"
- In reply to: SangHunJung: "RE: GRANT Select to all tables on a DB"
- Next in thread: Dan Guzman: "Re: GRANT Select to all tables on a DB"
- Reply: Dan Guzman: "Re: GRANT Select to all tables on a DB"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|