-
Neil,
Like Jbane said All you need is the db_datareader. But here is a script that should do the job. Run it against each database.
set nocount on
declare @object varchar(40)
declare mycursor scroll cursor
for
select name from sysobjects
where type = 'u'
order by name
open mycursor
fetch first from mycursor into @object
while @@fetch_status <> -1
begin
if @@fetch_status <> -2
begin
exec('grant select on '+@object+' to [Q4W_Report]')
end
fetch next from mycursor into @object
end
close mycursor
deallocate mycursor
Pan
set nocount off
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|