EasyManua.ls Logo

Sybase Adaptive Server Anywhere - System Extended Stored Procedures

Sybase Adaptive Server Anywhere
1182 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 14 System Procedures and Functions
981
System extended stored procedures
A set of system extended procedures are included in Adaptive Server
Anywhere databases. These procedures are owned by the
dbo
user ID.
The following sections describe each of the stored procedures.
MAPI system extended stored procedures
Adaptive Server Anywhere includes three system procedures for sending
electronic mail using Microsoft’s Messaging API standard (MAPI). These
system procedures are implemented as extended stored procedures: each
procedure calls a function in an external DLL.
In order to use the MAPI stored procedures, a MAPI e-mail system must be
accessible from the database server machine.
The MAPI stored procedures are:
xp_startmail Starts a mail session in a specified mail account by
logging on the MAPI message system
xp_sendmail Sends a mail message to specified users
xp_stopmail Closes the mail session
The following procedure notifies a set of people that a backup has been
completed.
CREATE PROCEDURE notify_backup()
BEGIN
CALL xp_startmail( mail_user=’ServerAccount’,
mail_password=’ServerPassword’
);
CALL xp_sendmail( recipient=’IS Group’,
subject=’Backup’,
"message"=’Backup completed’
);
CALL xp_stopmail( )
END
The MAPI system procedures are discussed in the following sections.
xp_startmail system procedure
Starts an e-mail session.
[ [
variable
= ] CALL ] xp_startmail (
... [ mail_user =
mail-login-name
]
Function
Syntax

Table of Contents

Related product manuals