SELECT 'GRANT EXECUTE ON ' + sysobjects.name + ' TO AccountName' +
CHAR(10) + CHAR(13) + CHAR(10) + CHAR(13)
FROM sysobjects
WHERE type = 'P' and category = 0 AND name not like 'sp_%'
生成脚本后再执行
SELECT 'GRANT EXECUTE ON ' + sysobjects.name + ' TO AccountName' +
CHAR(10) + CHAR(13) + CHAR(10) + CHAR(13)
FROM sysobjects
WHERE type = 'P' and category = 0 AND name not like 'sp_%'
生成脚本后再执行