bo SQL Server System Stored Procedures
back link building services=

!!

Join over 140k discussions or create one FREE


Cokoye is an Africans forum with over 500k members where people freely discuss issues. Register now to Join or start discussions FREE.

digital marketing

Author Topic: SQL Server System Stored Procedures  (Read 1163 times)

0 Members and 1 Guest are viewing this topic.

Offline Webm

  • Cokoye Hero Member
  • *****
  • Posts: 3284
  • Karma: +0/-3
  • Gender: Male
    • View Profile
    • Nigerian Web hosting Company
System Stored Procedures System stored procedures are packaged with SQL Server. Many procedures are used to administer SQL Server, but some are utilities that can be profitablly used by developers. They are global, and can be called from any database application without their fully qualified name. (They are all owned by dbo.) . They are all stored in the Master database, and have the prefix sp_. This is a reason why it is considered unwise to name local stored procedures with the sp_ prefix. They can be read by viewing their properties in the Query Analyzer.

The system-stored procedures are grouped into these categories.

Category
 Description
 
Active Directory Procedures
 Used to register instances of SQL Server and SQL Server databases in Microsoft Windows® 2000 Active Directory™.
 
Catalog Procedures
 Implements ODBC data dictionary functions and isolates ODBC applications from changes to underlying system tables.
 
Cursor Procedures
 Implements cursor variable functionality.
 
Database Maintenance Plan Procedures
 Used to set up core maintenance tasks necessary to ensure database performance.
 
Distributed Queries Procedures
 Used to implement and manage Distributed Queries.
 
Full-Text Search Procedures
 Used to implement and query full-text indexes.
 
Log Shipping Procedures
 Used to configure and manage log shipping.
 
OLE Automation Procedures
 Allows standard OLE automation objects to be used within a standard Transact-SQL  BATCH.
 
Replication Procedures
 Used to manage replication.
 
Security Procedures
 Used to manage security.
 
SQL Mail Procedures
 Used to perform e-mail operations from within SQL Server.
 
SQL Profiler Procedures
 Used by SQL Profiler to monitor performance and activity.
 
SQL Server Agent Procedures
 Used by SQL Server Agent to manage scheduled and event-driven activities.
 
System Procedures
 Used for general maintenance of SQL Server.
 
Web Assistant Procedures
 Used by the Web Assistant.
 
XML Procedures
 Used for Extensible Markup Language (XML) text management.
 
General Extended Procedures
 Provides an interface from SQL Server to external programs for various maintenance activities.
 

You can create your own system-stored procedures by following the guidelines outlined above. But, even though it is possible to modify an existing system sproc, it is better to name it with another name than to destroy the system version.

Dynamic Queries are created and executed within a stored procedure, and are built typically by passing in text parameters and creating a text SQL string. Then the string is executed using the form EXEC (@createdstring). Dynamic query plans are not stored in cache, and local variables created in the dynamic query are not available after the query is executed. To save the query plan, instead of the keyword EXEC, use sp_executesql. Also, with sp_executesql local variables can be used both as INPUT and as OUTPUT parameters.

Autoexec procedures, called autostart procedures can be made by invoking the system stored procedure
sp_procoption procedurename, startup, true

Extended Store Procedures
Extended stored procedures are auxiliary stored procedures created in a DLL using C++. They are prefixed with xp_, and stored in the Master database. When called from an application database, they bust be fully referenced, using the Master..xp_procname form. Before you can invoke it, you must register the DLL with SQL Server using the syntax:

sp_addextendedproc [@functname=] ‘procedure’, [@dllname=] ‘dll’

Resources:
Information Getting Started with Sybase

This resource discusses Sybase database management system.

Information: Accessing Stored Procedures

This resource gives insightful information on accessing stored procedures.


 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Name: Email:
Verification:
How many character is in the word "Nigeria":

Related Topics

  Subject / Started by Replies Last post
0 Replies
1626 Views
Last post
by Webm
0 Replies
979 Views
Last post
by jchima14
0 Replies
830 Views
Last post
by fanzhou
0 Replies
536 Views
Last post
by rjshemlame
1 Replies
364 Views
Last post
by Perfect

back link building services=