Extended stored procedures are implemented by an Open Server™ application called XP Server, which runs on the same machine as Adaptive Server. Running ESPs in a separate process protects Adaptive Server from failing because of faulty ESP code. Adaptive Server and XP Server communicate through remote procedure calls (RPCs).
The function that implements the ESP is compiled and linked into a dynamic link library (DLL) or a shared library. Adaptive Server looks in the system tables for the function that has the same name as the requested ESP and passes the function name and the DLL name to XP Server.
XP Server is responsible for:
Loading the DLL, if it is not already loaded.
Invoking the function that implements the ESP.
Passing the function’s return status, output parameters, and results back to Adaptive Server.
Adaptive Server passes the results of the function to the client.
Adaptive Server starts XP Server on the first ESP request and shuts down XP Server when Adaptive Server shuts down.
The installation or configuration program for your platform adds the default <hostname>_XP entry to the interfaces file and the sysservers table. Additional XP Server entries must be added to the interfaces file using dsedit. Additional XP Server entries to the sysservers table must be manually added. There is no run_server file associated with XP Server.
See the Transact-SQL User’s Guide for detailed information about using and developing your own ESPs.
To develop your own ESPs, you need to purchase the Open Server product.