UNIX only Sends a message to a User Datagram Protocol (UDP) port.
syb_sendmsg ip_address, port_number, message
is the IP address of the machine where the UDP application is running.
is the port number of the UDP port.
is the message to send. It can be up to 255 characters in length.
Sends the message “Hello” to port 3456 at IP address 126.96.36.199:
select syb_sendmsg("188.8.131.52", 3456, "Hello")
Reads the IP address and port number from a user table, and uses a variable for the message to be sent:
declare @msg varchar(255) select @msg = "Message to send" select syb_sendmsg (ip_address, portnum, @msg) from sendports where username = user_name()
To enable the use of UDP messaging, a System Security Officer must set the configuration parameter allow sendmsg to 1.
No security checks are performed with syb_sendmsg. Sybase strongly recommends caution when using syb_sendmsg to send sensitive information across the network. By enabling this functionality, the user accepts any security problems which result from its use.
For a sample C program that creates a UDP port, see sp_sendmsg.
SQL92 – Compliance level: Transact-SQL extension.
Any user can execute syb_sendmsg.
System procedure sp_sendmsg