sp_addextendedproc

Description

Creates an extended stored procedure (ESP) in the master database.

Syntax

sp_addextendedproc esp_name, dll_name

Parameters

esp_name

is the name of the extended stored procedure. This name must be identical to the name of the procedural language function that implements the ESP. esp_name must be a valid Adaptive Server identifier.

dll_name

is the name of the dynamic link library (DLL) file containing the function specified by esp_name. The dll_name can be specified with no extension or with its platform-specific extension, such as .dll on Windows NT or .so on Sun Solaris. If an extension is specified, the dll_name must be enclosed in quotation marks.

Examples

Example 1

Registers an ESP for the function named xp_echo, which is in the sqlsrvdll.dll file. The name of the resulting ESP database object is also xp_echo:

sp_addextendedproc xp_echo, "sqlsrvdll.dll"

Usage

Permissions

Only a System Administrator can execute sp_addextendedproc.

See also

Commands create procedure

System procedures sp_dropextendedproc, sp_helpextendedproc