Compiling stored procedures programmatically using c#

179 Views Asked by At

I have 500 stored procedures and want to compile all and if error comes it should write in file using c#. if anybody has similar example code help

1

There are 1 best solutions below

0
behinafzar bahrami On

If you call the command to alter a store procedure once, if the execution of the command encounters an error, it means that your store procedure has a problem. You can get the store procedures script through the following script Of course, this script gives the Create and you have to change it to Alter

select name, object_definition(object_id) 
from sys.procedures