web 2.0

Stored Procedure

Stored Procedure is a set of SQL commands that are named and stored on the server. Stored procedure usually contains general commands on the server, and generates a set of recorded. Stored procedure written in the form of a script.

Store procedure will improve the performance of databases, database security, and allows creating programs to the database. Improved performance through the use of local storage, a program that has been compiled, and the use of cache.

Stored procedure is more efficient than regular commands, because the procedure is stored on the server at the time made and executed on the server. Stored procedure that contains a set of commands Transtact-SQL will be executed by a Transtact-SQL command. Before the stored procedure is created, the writing of the command syntax will be checked. If no errors, a procedure will be stored in tables and text SysObjects SysComments stored in tables. First time stored procedure is executed, the execution plan is created and stored procedure is compiled. Subsequent processing will be faster, because SQL Server does not need to check syntax and create a plan of execution, or compile a procedure.

Stored procedure can accept parameters, and generate parameters and provide feedback in the form of a status code and text, and can call another procedure. Stored procedure ensures isolation and security with encryption. With encryption, the user can not read the commands used in stored procedures.

1 comments:

Rizky2009 said...

mantab dah artikelnya sob

Post a Comment