Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Code optization and reusability

Author  Topic 

heze
Posting Yak Master

192 Posts

Posted - 2006-08-07 : 01:36:20
Hi,

I have been developing a bunch of stroed procedures and scripts for a while, we are in the business of reporting both well expected reports and improvised data requests, there are other sql developers doing the same.
Until now, for each data request and in most cases for the well expected reports a different developer creates de code to fulfill the requirement than the one that created a similar one and maybe exaclty the same, previously. (It is a strategy of management to avoid depeding on one developer, so its not going to change).
Currentyl, there is paracitcally no control of who created what. Therefore, we have out there 3 or 4 differnent scripts developed even by the same person only on different times, to erform the same set of operations.
I am the administrator and currenty, since we have no formal control, we create very few stored procedures in the SQL Server.
We want to improve the way we work by starting to have this type of control. The goal is to reuse code by building generic stored procs, controlling which stored procedures or sets of them are ued for which reports, i ve found its not an easy task, for example how do I ensure that stored proc F is not the same or similar to stored proc B, created previously without checking one by one ABCD and E, also, if I create a lot of small generic stored procs, I may end up bloating the database with hundreds of stored procedures creating a potential management hell.
It would be great to receive soome feedback as to what is the best way to proceed. I read about some packges like apexsql that does some interesting work like doing the diffs of procs and tables or provides "intellisense" dropdowns. I am also doing some reseaech as to how can I implement some of the object o. progr. features in SQL to avoid duplication (please let me know if you know of a way to improvise OOP techniques in SQL Server) but I guess the only way to do that is in the application level, iin which case controlling the code could become harder.

Thank you
   

- Advertisement -