trigger to call unix mail 
Author Message
 trigger to call unix mail
Is there a way within ASE 11.9/12 Solaris UNIX, to invoke
mailx(sendmail)?

I've considered using xp_cmdshell.

Has anyone tried this?



Fri, 25 Apr 2003 03:00:00 GMT
 trigger to call unix mail

Paul,

The only way to invoke mailx within a Sybase stored procedure (or isql)
is to use the XP server.  This does work; however, we currently have a
case open with Sybase on a critical problem with XP server under HP-UX:
the XP server is supposed to start up automatically when a Unix command
or script is invoked, and it doesn't.  We have to start the XP server
manually (or reboot the ASE server) to get it to work.  Sybase does not
seem to have any idea why this is happening.  Once you get the XP server
started, it will work fine until the next time the machine is rebooted,
then it will break again.  Very frustrating.

In the Windows NT environment, there is an xp_sendmail command that can
be executed via the XP server.  In Unix environments, you have to use
the xp_cmdshell command.

Important Note:  When setting up an XP server, the XP server name must
be the same as your ASE server name (in caps) with '_XP' appended.  For
example, if your ASE server name is SERVER1, the XP server name must be
SERVER1_XP.  There must be an entry in sysservers for the XP server, as
well as an entry in the interfaces file.  If you have an entry for
'local' in sysservers, you should remove it.

Also, very important, use sp_configure to change the value of the
configuration parameter 'xp_cmdshell context' to 0 (not 1, which is the
default).  Otherwise, you need root superuser permissions to invoke the
XP server.

That's all I know.  Hope it helps.

                                    Larry Burns



Quote:
> Is there a way within ASE 11.9/12 Solaris UNIX, to invoke
> mailx(sendmail)?

> I've considered using xp_cmdshell.

> Has anyone tried this?

Sent via Deja.com http://www.deja.com/
Before you buy.


Fri, 25 Apr 2003 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Calling UNIX from a trigger or stored procedure

2. Calling a Unix Process From A Trigger

3. Calling a Unix Process From A Trigger

4. UNIX CALL FROM A STORED PROCEDURE OR TRIGGER

5. SQL Mail and Unix mail

6. Cursor fails when called procedure called from trigger

7. SQL*Loader missing defaults when called from Unix's system call

8. Calling a Stored Procedure Created in DB2/UDB on UNIX from a UNIX command line

9. Mail, mail, mail...??

10. MAPI Call Fails When Sending Mail Using SQL Server

11. Automatically sending e-mail or phone call from Oracle

12. Plugin called mail.it from dacons.net


 
Powered by phpBB® Forum Software