November 2, 2010 at 3:36 pm
Is there any real advantage to using a stored procedure other than that it is modular / encapsulated?
November 2, 2010 at 3:45 pm
Numerous.
Stored Cache in engine.
Security allowed execute only on proc and no direct data access.
Multiple call reusability.
(Depending on tasks) Can do multi-step processes that a view cannot.
Helps to protect against SQL injection.
... and the list goes on.
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
November 2, 2010 at 3:58 pm
In addition to Craig's....
It makes database changes and tuning so much easier. From a DBA's perspective, you need to maintain the ability to make DB schema changes for performance, data integrity, etc. without worrying about breaking application code. Having your DB access code all embedded in stored procedures allows you to quickly figure out the scope of a schema change. This is extremely difficult to do when all of the data access code is within the application code. Simple schema changes can result in having to change and redeploy application code....not good.
November 2, 2010 at 6:20 pm
Thank you.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply