OPEN crsr
declare @proc varchar(100)
declare @stmt nvarchar(200)
fetch next from crsr into @proc
while @@fetch_status=0
begin
set @stmt='grant execute on ['+@proc+'] to username'
exec SP_EXECUTESQL @STMT
print @stmt
fetch next from crsr into @proc
end
close crsr
deallocate crsr
Hiç yorum yok:
Yorum Gönder