Registers the name of a new extended stored procedure to Microsoft® SQL Server™.
sp_addextendedproc [@functname =] 'procedure',
[@dllname =] 'dll'
0 (success) or 1 (failure)
None
Programmers using Microsoft Open Data Services can create extended stored procedures. After an extended stored procedure is created, it must be added to SQL Server by using sp_addextendedproc. For more information, see Creating Extended Stored Procedures.
Only add an extended stored procedure to the master database. To execute an extended stored procedure from a database other than master, qualify the name of the extended stored procedure with master.
sp_addextendedproc adds entries to the sysobjects table, registering the name of the new extended stored procedure with SQL Server. It also adds an entry in the syscomments table.
Only members of the sysadmin fixed server role can execute sp_addextendedproc.
This example adds the xp_diskfree extended stored procedure.
USE master
EXEC sp_addextendedproc xp_hello, 'xp_hello.dll'
EXECUTE | sp_dropextendedproc |
GRANT | sp_helpextendedproc |
REVOKE | System Stored Procedures |