Sybase Adaptive Server Anywhere Reference page 1002

Table of Contents

Advertisement

System extended stored procedures
Other system extended stored procedures
xp_cmdshell system procedure
Function
Syntax
Permissions
Description
Example
xp_msver system function
Function
Syntax
984
The other system extended stored procedures included are:
Executes a system command.
xp_cmdshell
Returns a string containing version information.
xp_msver
xp_sprintf
Builds a string from a format string and a set of input
strings.
Extracts substrings from an input string and a format string.
xp_scanf
The following sections provide more detail on each of these procedures.
Carries out an operating system command from a procedure.
[ variable = CALL ] xp_cmdshell ( string )
None.
xp_cmdshell executes a system command and then returns control to the
calling environment.
The following statement lists the files in the current directory in the file
c:\temp.txt
xp_cmdshell('dir > c:\\temp.txt')
Retrieves version and name information about the database server.
xp_msver ( string )
The string must be one of the following, enclosed in string delimiters.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents