Who we are What we can do Where we have worked Why we have been used What our customer say Join us
SEO Plans Ektron SEO CubeCart SEO Drupal SEO Joomla SEO Magento eCommerce SEO Modx SEO osCommerce SEO Wordpress SEO Typo3 SEO
Outsource PHP Development Offshore .NET Development Offshore Java Development
osCommerce Development CubeCart Development Magento Development
Drupal CMS Customization WordPress CMS Development Wordpress Packages Modx CMS Development Joomla CMS Development Ektron CMS Development Typo3 CMS Development DotNetNuke Development
Stored Procedures are typical special type of functions that can execute under the SQL Server Environment. SP's are said to be building blocks of any we application / distributed / client server applications. There are several basic advantages in using stored procedures.
SQL Server does have Different Category of Procedures Available.
|
Apart from the above list of procedures, we can write our own Custom Stored Procedures.
Stored Procedures does have simple life cycle and it begins with the Create Proc statement, once the set of statements has been successfully passed the syntax checking the name of the procedure is stored in the sysobjects table and the entire procedure commands / statements will be stored in syscomments table.
As you can notice from the above diagram while creating the stored procedures, the compiler would just perform Syntax Checking and it doesn’t looks for the existence of the objects referred in your procedure. So you can have total freedom to refer any Dynamic Objects that may be created at runtime.
The main advantage of using stored procedure is the effective utilization of server’s resources when compared to issuing serious of SQL Commands. Though there are is considerable advantage in using cached execution plans, both SQL Server 2000 and 2005 is designed to catch all the TSQL Batch Statements regardless of whether they are stored procedures or not.
Apart from this, there are other advantages that you can consider while using stored procedures.As we all know the basics of creating stored procedures, here we will be looking few advanced options such as
Temporary Stored Procedures are new set of features added to SQL Server 2000 and they can be create as like creating temporary tables using “#” or “##” before the procedure name. All these temporary procedures are stored in tempdb and care must be taken not to put big procedures as temporary procedures. Small Procedures designed using WITH RECOMPILE Option can be replaced by these temporary stored procedures. But if you really need to execute serious of dynamic SQL Statements, it is advised to use sp_executesql.
A Stored Procedure can be created with a default value for a parameter which we can also refer as Stored Procedures with optional parameters. Suppose if you need to design a common procedure for insertion, updating and selection of records, and this procedure can be used to filter records using all the columns, here is a way to do it.