Results 1 to 6 of 6

Thread: Use Of Stored Procedure in SQL Server

  1. #1
    Join Date
    Nov 2009
    Posts
    680

    Use Of Stored Procedure in SQL Server

    Hello, I am learning SQL server and while learning it, it is quiet complicated to get the stored procedure. It is too much difficult for me to understand. If anyone is having any type of details which will help me to understand this concept then please help me to get that.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    Re: Use Of Stored Procedure in SQL Server

    If you want to use the stored procedure then follow the steps below:
    1. We first establish the connection to the database.
    2. We create an SQL command type stored procedure that will allow us to use the procedure created.
    3. We add the parameters needed for executing the stored procedure.
    4. Finally, we execute the command and the object's.

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    Re: Use Of Stored Procedure in SQL Server

    To write debug and execute stored procedures in a database SQL Server you must use Query Analyzer (Query Analyzer). To create a new procedure, enter the word in the Query pane and press Ctrl + E to execute its definition. Attention understand that this action is that the procedure to attach the database but does not actually execute the stored procedure itself!

    To execute a stored procedure you must run the following statement: EXECUTE :To create a new stored procedure and attach it to the database being you must use the CREATE PROCEDURE. The general syntax of the statement is as follows:
    CREATE PROCEDURE:
    Code:
    CREATE PROCEDURE procedure_name AS 
    { 
    procedure definition
    }
    Procedure_name Where is the name of the new stored procedure and the block of statements following the keyword AS is the procedure body.

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Use Of Stored Procedure in SQL Server

    Stored procedure is used for the purpose below:
    • You can save and reuse your Execution plan in future
    • You can provide your query auto-parameterization
    • You will able to secure your business rules and policies
    • It is simple to modularize your program.
    • You can share your logic.
    • You can simply access the objects of database.
    • By the use of it you can simply save your network bandwidth.
    • Stored procedure can automatically executed.
    • It will increase your hardware and software working.
    • Security is increased.

  5. #5
    Join Date
    May 2008
    Posts
    2,297

    Re: Use Of Stored Procedure in SQL Server

    If you want to create a stored procedure and if you are making use of the Enterprise Manager of SQL Server 2000 then follow the steps below:
    • Select the database on which we work (For example, the database called "VMTPK).
    • Go to Stored Procedures.
    • In the Action menu, select "New Stored Procedure".
    • Done.

  6. #6
    Join Date
    Oct 2005
    Posts
    2,393

    Re: Use Of Stored Procedure in SQL Server

    Some of the time there is necessary to use the Stored Procedure which are as below:
    • When multiple client applications are written in different languages on different platforms, and use the server as a point of interaction.
    • Where safety is a priority.
    • Banks, for example, use stored procedures for all operations standards. This leads to a coherent and secure procedures for ensuring that operations ridges and properly recorded. In such configuration, applications and users have no direct access to tables, but go through procedures stored pre-defined.

Similar Threads

  1. Stored procedure in MySQL database
    By Ameeryan in forum Software Development
    Replies: 5
    Last Post: 04-03-2010, 10:31 PM
  2. How to call SQL server with ASP views and stored procedure?
    By Acalapati in forum Software Development
    Replies: 4
    Last Post: 13-02-2010, 01:51 AM
  3. How to create, deploy and use DB2 stored procedure
    By garfield1 in forum Software Development
    Replies: 3
    Last Post: 08-08-2009, 11:10 AM
  4. How to Write stored procedure in SQL Server
    By Benito in forum Software Development
    Replies: 3
    Last Post: 03-08-2009, 12:29 PM
  5. How to call stored procedure using do while Loop
    By AK_Chopra in forum Software Development
    Replies: 3
    Last Post: 29-05-2009, 01:47 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,009,952.23255 seconds with 16 queries