Code: Select all
select 'grant exec on ' + 'sp_name' + ' to ' + su.name as granttext
from sysobjects so,
sysprotects sp,
sysusers su
where so.name = 'sp_name '
and sp.id = so.id
and su.uid = sp.uid
order by su.name
Code: Select all
select 'grant exec on ' + 'sp_name' + ' to ' + su.name as granttext
from sysobjects so,
sysprotects sp,
sysusers su
where so.name = 'sp_name '
and sp.id = so.id
and su.uid = sp.uid
order by su.name