SQL Server - Script file To execute all stored procedures

Asked By kughan j on 16-Mar-12 09:20 AM
Hi Friends,

   I have nearly 150 stored procedures saved in word file.Now im executing all the procedures one by one in my database.
Is there any other way where I can execute all the stored procedures in on shot .


Please give me some suggestions.


Thanks
Kughan.
kalpana aparnathi replied to kughan j on 16-Mar-12 09:24 AM
hi,

Generate the statements, then copy them and paste into query window to run them.

select 'grant execute on ' +
  QuoteName(specific_schema) + '.' +
  QuoteName(specific_name) + ' to someone'
from information_schema.routines
where routine_type='PROCEDURE'

Regards,