--增加执行过程权限 declare @min int declare @max int declare @str char(120) declare @table varchar(40)declare @tem table( NO int identity(1,1), name varchar(40) ) insert @tem select name from sysobjects where type in('P')select @min=1,@max=max(NO) from @tem while @min<=@max begin select @table=name from @tem where NO=@min select @str=' grant execute on [dbo].['+@table+'] to 用户' exec (@str) select @min=@min+1 end go
declare @min int
declare @max int
declare @str char(120)
declare @table varchar(40)declare @tem table(
NO int identity(1,1),
name varchar(40)
)
insert @tem select name from sysobjects where type in('P')select @min=1,@max=max(NO) from @tem
while @min<=@max begin
select @table=name from @tem where NO=@min
select @str=' grant execute on [dbo].['+@table+'] to 用户'
exec (@str)
select @min=@min+1
end
go