Configuring Adaptive Server to use extended stored procedures

Extended stored procedures are run by an Open Server application called XP Server. When you run an extended stored procedure, the performance of Adaptive Server can be affected. You can set the following Adaptive Server configuration parameters to control the effect of running extended stored procedures:

xp_cmdshell_context sets the security context for the operating system command to be executed using the xp_cmdshell system extended stored procedure. If xp_cmdshell_context is zero, the permissions of the operating system account under which Adaptive Server is running are the permissions used to execute an operating system command from xp_cmdshell. This can allow users to execute operating commands that they would not ordinarily be able to execute under the security context of their own operating system accounts.

esp_execution_stacksize sets the size of the stack, in bytes, to allocate for ESP execution. Reset this parameter if your extended stored procedure functions require a larger stack size than the default 34816 bytes.

esp_execution_priority sets a priority from 0 through 15. The default priority is 8. If you set a high priority, the Open Server scheduler runs the extended stored procedure before other threads in its queue.

esp_unload_dll unloads a DLL from memory after the extended stored procedure that requested it terminates. If you set esp_unload_dll, all DLLs are unloaded. You can also unload DLLs individually using the sp_freedll system procedure. Using esp_unload_dll minimizes the amount of memory used by XP Server.

For information about setting configuration parameters, see “Configuring Adaptive Server,” in Chapter 3, “Managing the Adaptive Server Operating Environment.”