Creates an extended stored procedure (ESP) in the master database.
sp_addextendedproc esp_name, dll_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.
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.
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"
Execute sp_addextendedproc from the master database.
The esp_name is case sensitive. It must match the name of the function in the DLL.
The DLL represented by dll_name must reside on the server machine on which the ESP is being created and the DLL directory must be in:
Windows NT – $PATH
Compaq Tru64 – $LD_LIBRARY_PATH
HP – $SH_LIBRARY_PATH
If the file is not found, the search mechanism also searches $SYBASE/dll on Windows NT and $SYBASE/lib on other platforms.
On Windows NT – an ESP function should not call a C run-time signal routine. This can cause XP Server to fail, because Open Server™ does not support signal handling on Windows NT.
Only a System Administrator can execute sp_addextendedproc.
Commands create procedure
System procedures sp_dropextendedproc, sp_helpextendedproc