Extended stored procedures

These are the syntax and very brief descriptions for Adaptive Server extended stored procedures. See Reference Manual: Procedures for complete information.

xp_cmdshell

Executes a native operating system command on the host system running Adaptive Server.

xp_cmdshell command[, no_output] [return_status | no_wait]

xp_deletemail

(Windows NT only) Deletes a message from the Adaptive Server message inbox.

xp_deletemail [msg_id]

xp_enumgroups

(Windows NT only) Displays groups for a specified Windows NT domain.

xp_enumgroups [domain_name]

xp_findnextmsg

(Windows NT only) Retrieves the next message identifier from the Adaptive Server message inbox.

xp_findnextmsg @msg_id = @msg_id  output[, type]
	[, unread_only = {true | false}]

xp_logevent

(Windows NT only) Provides for logging a user-defined event in the Windows NT Event Log from within Adaptive Server.

xp_logevent error_number, message[, type]

xp_readmail

(Windows NT only) Reads a message from the Adaptive Server message inbox.

xp_readmail [msg_id]
	[, recipients  output]
	[, sender  output]
	[, date_received  output]
	[, subject  output]
	[, cc  output]
	[, message  output]
	[, attachments  output]
	[, suppress_attach = {true | false}]
	[, peek = {true | false}]
	[, unread = {true | false}]
	[, msg_length  output]
	[, bytes_to_skip  [output]]
	[, type [output]]

xp_sendmail

(Windows NT only) Sends a message to the specified recipients. The message is either text or the results of a Transact-SQL query.

xp_sendmail recipient [; recipient] . . .
	[, subject]
	[, cc_recipient] . . .
	[, bcc_recipient] . . . 
	[, {query | message}]
	[, attachname]
	[, attach_result = {true | false}]
	[, echo_error = {true | false}]
	[, include_file [, include_file] . . .]
	[, no_column_header = {true | false}]
	[, no_output = {true | false}]
	[, width]
	[, separator]
	[, dbuser]
	[, dbname]
	[, type]
	[, include_query = {true | false}]

xp_startmail

(Windows NT only) Starts an Adaptive Server mail session.

xp_startmail [mail_user ] [, mail_password]

xp_stopmail

(Windows NT only) Stops an Adaptive Server mail session.

xp_stopmail