Getting Started with Adobe After Effects - Part 6: Motion Blur
This module helps you to share, discuss and learn interview questions and answers of different technologies

Benefits of SQL Stored Procedures

Oct 31 2011 1:23PM by Vivek Johari   


Why should we use the Stored Procedure in SQL Server or Why should we prefer Stored Procedure instead of Inline Queries?


1) One of the main benefit of using the Stored procedure is that it reduces the amount of information sent to the database server. It can become more important benefit when the bandwidth of the network is less. Since if we send the sql query (statement)which is executing in a loop to the server through network and the network get disconnected then the execution of the sql statement don't returns the expected results, if the sql query is not used between Transaction statement and rollback statement is not used.

2) Compilation step is required only once when the stored procedure is created. Then after it does not required recompilation before executing unless it is modified and re utilizes the same execution plan whereas the sql statements needs to be compiled every time whenever it is sent for execution even if we send the same sql statement every time.

3) It helps in re usability of the sql code because it can be used by multiple users and by multiple client since we needs to just call the stored procedure instead of writing the same sql statement every time. It helps in reduces the development time.

4) Stored procedure is helpful in enhancing the security since we can grant permission to the user for executing the Stored procedure instead of giving the permission on the tables used in the Stored procedure.

5) Sometime it is useful to use the database for storing the business logic in the form of stored procedure since it make it secure and if any change is needed in the business logic then we may only need to make changes in the stored procedure and not in the files contained on the web server.

Read More..   [0 clicks]

Published under: SQL Server Interview Questions ·  ·  ·  · 

Vivek Johari
117 · 1% · 445


Your Comment

Sign Up or Login to post a comment.

"Benefits of SQL Stored Procedures " rated 5 out of 5 by 3 readers
Benefits of SQL Stored Procedures , 5.0 out of 5 based on 3 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]