TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Different types of Stored Procedure in sql server.
Purushottam Rathore
Jun 22, 2012
28.1
k
0
1
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
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
Different types of Storage Procedure in sql server.
Next Recommended Reading
Executing SQL Stored Procedure from Another Stored Procedure