Advantages and disadvantages of store procedure
Loading
Advantages and disadvantages of store procedure
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Aravind GovindarajRank #430 · 5.8K reputationPosted Nov 27, 2022, 5:08 AM EST
SP Advantages:
Disadvantages:
Aradhana TripathiRank #509 · 4.8K reputationPosted Feb 9, 2023, 12:15 PM EST
Below are the advantages and disadvantages of stored procedure:
Advantages of store procedure:
Precompiled execution
Reduced client/server traffic
Efficient reuse of code and programming abstraction
Enhanced security controls
Disadvantages of store procedure:
Limited Coding Functionality
Portability
Difficult to Debug.
Not easy to Develop and Maintain
Rajeev KumarRank #1,334 · 1.3K reputationPosted Mar 2, 2023, 8:47 AM EST
Pros:
Cons:
Vishal YelveRank #178 · 13.6K reputationPosted Mar 2, 2023, 8:59 AM EST
Advantages :
The main advantages of stored procedure are:
The procedure calls are quick and efficient as stored procedures are compiled once and stored in executable form.Hence the response is quick. The executable code is automatically cached, hence lowers the memory requirements.
Since the same piece of code is used again and again so, it results in higher productivity.
To create a stored procedure, one can use any Java Integrated Development Environment (IDE). Then, they can be deployed on any tier of network architecture.
Stored procedures increase scalability by isolating application processing on the server.
Maintaining a procedure on a server is much easier then maintaining copies on various client machines, this is because scripts are in one location.
Access to the Oracle data can be restricted by allowing users to manipulate the data only through stored procedures that execute with their definer’s privileges.
Disadvantages :
The main disadvantages of stored procedures are:
Testing of a logic which is encapsulated inside a stored procedure is very difficult. Any data errors in handling stored procedures are not generated until runtime.
Depending on the database technology, debugging stored procedures will either be very difficult or not possible at all. Some relational databases such as SQL Server have some debugging capabilities.
Version control is not supported by the stored procedure.
An extra developer in the form of DBA is required to access the SQL and write a better stored procedure. This will automatically incur added cost.
Complex stored procedures will not always port to upgraded versions of the same database. This is specially true in case of moving from one database type(Oracle) to another database type(MS SQL Server).
Tuhin PaulRank #7 · 71.9K reputationPosted Mar 2, 2023, 2:15 PM EST
Advantages:
Disadvantages: