sp_addextendedproc System Stored Procedure

Registers the name of a new extended stored procedure to SQL Server.

Syntax

sp_addextendedproc function_name, dll_name

where

function_name
Is the name of the function to call within the DLL.
dll_name
Is the name of the DLL containing the function.

Remarks

Programmers using Microsoft Open Data Services can create extended stored procedures. Once an extended stored procedure is created, it must be added to SQL Server by using sp_addextendedproc. For more information about creating extended stored procedures, see Microsoft SQL Server Programming Open Data Services.

You should only add an extended stored procedure to the master database. To execute an extended stored procedure from a database other than master, you must qualify the name of the extended stored procedure with master.

The sp_addextendedproc procedure 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.

Example

This example adds the xp_diskfree extended stored procedure.

sp_addextendedproc xp_diskfree

Permission

Only the system administrator can use this procedure.

Table Used

syscomments, sysobjects

See Also

EXECUTE sp_dropextendedproc
GRANT sp_helpextendedproc
REVOKE