a) If you need to install application and part of the install process is that you need to create a stored procedure, you should make it as a requirement
b) Irrespective of Database server type, a stored procedure is always better than external programming language, unless you want to do something real-time, then it would be C.