System extended stored procedures

An extended stored procedure (ESP) letes you call external language functions from within Adaptive Server. Adaptive Server includes a set or predefined ESPs; users can also create their own. The names of all system extended stored procedures begin with “xp_”, and are located in the sybsystemprocs database.

One very useful system ESP is xp_cmdshell, which executes an operating system command on the system that is running Adaptive Server.

Invoke a system ESP just like a system procedure. The difference is that a system ESP executes procedural language code rather than Transact-SQL statements. All ESPs are implemented by an Open Server™ application called XP Server™, which runs on the same machine as Adaptive Server. XP Server starts automatically on the first ESP invocation.

For information about the system ESPs provided with Adaptive Server, see the Reference Manual: Procedures.