Blog

Different types of Stored Procedure in sql server.

Posted by Purushottam Rathore Blogs | SQL Jul 12, 2010
Different types of Stored Procedure in sql server.

Temporary Stored Procedures - SQL Server supports two types of temporary procedures:
  • Local temporary procedure
  • Global temporary procedure
Local temporary:
  • A local temporary procedure is visible only to the connection that created it.
  • Local temporary procedures are automatically dropped at the end of the current session.
Global temporary:
  • A global temporary procedure is available to all connections.
  • Global temporary procedures are dropped at the end of the last session using the procedure. Usually, this is when the session that created the procedure ends.
Temporary procedures named with # and ## can be created by any user.

System stored procedures are created and stored in the master database and have the sp_ prefix.(or xp_) System stored procedures can be executed from any database without having to qualify the stored procedure name fully using the database name master.

Automatically Executing Stored Procedures - One or more stored procedures can execute automatically when SQL Server starts. The stored procedures must be created by the system administrator and executed under the sysadmin fixed server role as a background process.
The procedure(s) cannot have any input parameters.

User stored procedure
post comment
     

Please could you explain practically :)

Posted by Lajapathy Arun Jun 22, 2012
COMMENT USING
PREMIUM SPONSORS
Over-C is a holistic consortium of communications and technology specialists. We build, deploy and market both business as well as consumer products and solutions.
Join a Chapter
SPONSORED BY
  • PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.
Get Career Advice from Experts