Click here to Skip to main content
15,887,822 members
Home / Discussions / Database
   

Database

 
GeneralRe: Do we need to promote SP's anymore? Pin
Mehdi Gholam25-Sep-11 0:17
Mehdi Gholam25-Sep-11 0:17 
GeneralRe: Do we need to promote SP's anymore? Pin
Mycroft Holmes25-Sep-11 2:12
professionalMycroft Holmes25-Sep-11 2:12 
GeneralRe: Do we need to promote SP's anymore? Pin
Mehdi Gholam25-Sep-11 9:10
Mehdi Gholam25-Sep-11 9:10 
GeneralRe: Do we need to promote SP's anymore? Pin
Mycroft Holmes25-Sep-11 12:44
professionalMycroft Holmes25-Sep-11 12:44 
GeneralRe: Do we need to promote SP's anymore? Pin
PIEBALDconsult25-Sep-11 6:01
mvePIEBALDconsult25-Sep-11 6:01 
GeneralRe: Do we need to promote SP's anymore? Pin
PIEBALDconsult25-Sep-11 5:57
mvePIEBALDconsult25-Sep-11 5:57 
GeneralRe: Do we need to promote SP's anymore? Pin
Mycroft Holmes25-Sep-11 12:43
professionalMycroft Holmes25-Sep-11 12:43 
AnswerRe: Do we need to promote SP's anymore? Pin
PIEBALDconsult25-Sep-11 5:31
mvePIEBALDconsult25-Sep-11 5:31 
It is well-known that I am basically anti-stored-procedure. Use them when you must, but not when you don't. (Currently the only time I must is when the boss insists. Sigh | :sigh: )

In the late 90s, when I first encountered SQL Server (6), we were accessing it via ODBC, and stored procedures were the only way to use transactions, so any code that altered the contents of the database had to be in a stored procedure (queries were not in stored procedures, I still boggle at people who insist on writing stored procedures for queries). I got to the client site to install the part of the system I supported and the client asked me to add a feature (a reasonable feature). It only involved a new column in a table and a small change to a stored procedure, but I didn't want to do that in the field without testing it. Unfortunately the program manager insisted, so I walked into the server room, started up enterprise mangler, added the column, and altered the stored procedure. It worked fine. Then I had to save the a script to add the column and the new version of the stored procedure to a floppy so I could put them into version control when I got back to the office -- that was fine, the plane didn't crash on my way back and the changes got into version control. But, twice when I was still with the company, and at least once since then, the stored procedure disappeared WTF | :WTF: !


My very biggest complaint about stored procedures (or any code stored in the database (it's a database, not a codebase)) is that it is too easy to change (or delete), either by mistake or by mischief.
On the other hand, making proper changes may be more difficult to make because you not only have to deploy new executables, but also ensure that the procedures and such are updated as well.

Whereas, with all the SQL in the executable, you only have to deploy the executables (after proper review and testing), and there's nothing in the database that allows anyone to alter production code.

And if you have multiple clients with customized versions of your software (which is my experience), you don't have to track custom procedures as well as custom program code.


It is my experience that stored procedures increase maintenance costs.


Where I am now, there are stored procedures and views galore, all of which could easily be in program code. One of my first tasks is to get them all into version control (the program code is already there). As part of that, I'm comparing them between dev, test, and prod. I have already found several procedures that won't execute because the tables have been altered, and some in prod that aren't in dev. But at least it pays well Cool | :cool: .
AnswerRe: Do we need to promote SP's anymore? Pin
Jörgen Andersson25-Sep-11 10:12
professionalJörgen Andersson25-Sep-11 10:12 
GeneralRe: Do we need to promote SP's anymore? Pin
_Maxxx_29-Sep-11 0:29
professional_Maxxx_29-Sep-11 0:29 
GeneralRe: Do we need to promote SP's anymore? Pin
Jörgen Andersson29-Sep-11 8:16
professionalJörgen Andersson29-Sep-11 8:16 
AnswerRe: Do we need to promote SP's anymore? Pin
Eddy Vluggen25-Sep-11 10:39
professionalEddy Vluggen25-Sep-11 10:39 
GeneralRe: Do we need to promote SP's anymore? Pin
PIEBALDconsult25-Sep-11 14:20
mvePIEBALDconsult25-Sep-11 14:20 
GeneralRe: Do we need to promote SP's anymore? Pin
Mycroft Holmes25-Sep-11 16:07
professionalMycroft Holmes25-Sep-11 16:07 
GeneralRe: Do we need to promote SP's anymore? Pin
Eddy Vluggen26-Sep-11 12:19
professionalEddy Vluggen26-Sep-11 12:19 
QuestionMySQL 5.2.34 CE Pin
Emejulu JVT24-Sep-11 8:34
Emejulu JVT24-Sep-11 8:34 
AnswerRe: MySQL 5.2.34 CE Pin
André Kraak24-Sep-11 8:55
André Kraak24-Sep-11 8:55 
Questiongenerating IDs with IDENTITY() in sql server 2005 Pin
Danzy8321-Sep-11 11:59
Danzy8321-Sep-11 11:59 
AnswerRe: generating IDs with IDENTITY() in sql server 2005 Pin
PIEBALDconsult21-Sep-11 14:25
mvePIEBALDconsult21-Sep-11 14:25 
AnswerRe: generating IDs with IDENTITY() in sql server 2005 PinPopular
Mycroft Holmes21-Sep-11 16:09
professionalMycroft Holmes21-Sep-11 16:09 
GeneralRe: generating IDs with IDENTITY() in sql server 2005 Pin
David Skelly21-Sep-11 22:37
David Skelly21-Sep-11 22:37 
JokeRe: generating IDs with IDENTITY() in sql server 2005 Pin
Mycroft Holmes21-Sep-11 23:10
professionalMycroft Holmes21-Sep-11 23:10 
GeneralRe: generating IDs with IDENTITY() in sql server 2005 Pin
David Skelly22-Sep-11 1:38
David Skelly22-Sep-11 1:38 
GeneralRe: generating IDs with IDENTITY() in sql server 2005 Pin
PIEBALDconsult22-Sep-11 3:19
mvePIEBALDconsult22-Sep-11 3:19 
GeneralRe: generating IDs with IDENTITY() in sql server 2005 Pin
David Skelly22-Sep-11 6:04
David Skelly22-Sep-11 6:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.