Is there a general rule of thumb when to create a SQL Server Stored Procedure for an Execute SQL Task

So sometimes I'll create a SQL Server Stored Procedure...sometimes I'll just write raw SQL in my Execute SQL Task.

Is there any general rule of thumb as to when to create a SQL Server Stored Procedure and when using raw SQL is alright when utilizing an Execute SQL Task? Would have it have anything to do with re-usability which would dictate a SQL Server Stored Procedure...is either one more efficient...

Thanks for your review and am hopeful for a reply.

September 4th, 2015 12:23pm

Procedure, as its name implies, is for more than a single SQL statement.

I tend to use ad-hoc sql for simple miscellaneous things, but when performance, or business logic is an item to worry about I choose the Stored Procedure.

Free Windows Admin Tool Kit Click here and download it now
September 4th, 2015 3:34pm

That's kind of what I thought and where I was on the subject.

Thanks Arthur!

September 4th, 2015 4:05pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics