Configuring your installation
Run the installmsgsvss script to install system stored procedures for real-time messaging services:
isql -Usa -Psa_password -Sserver_name -n -i$SYBASE/$SYBASE_ASE/scripts/installmsgsvss -ooutput_file
Add your local server:
sp_addserver, <local server name>
Restart your server.
Assign messaging_role permissions to users. For example:
grant role messaging_role to <login>
Real-Time Data Services, as a messaging services feature, uses these Adaptive Server configuration parameters. Set these when you configure Adaptive Server:
‘enable real time messaging’ – configures Adaptive Server to use Real Time Data Services. Its default value is 0. To turn this parameter on, enter:
sp_configure 'enable real time messaging', 1
'messaging memory' – specifies the number of memory pages set for messaging. Its default value is 400 2K pages, and its minimum value is 60 2K pages. For example, to set this parameter to 800, enter:
sp_configure 'messaging memory', 800
'max online Q engines' – required for MQ, specifies the maximum number of Q engines you can have online. You may need to increase 'max online engines' to accommodate the number of 'max online Q engines'. You must restart Adaptive Server for 'max online Q engines' to take effect.
'number of Q engines at startup' – required for MQ specifies the number of Q engines that are online at when the server starts. You may need to increase 'max online engines' to accommodate the number of 'max online Q engines'. You must restart Adaptive Server for 'number of Q engines at startup' to take effect.
This example assumes that current 'max online engines' is 4.
-- Add 2 more to 'max online engines'. sp_configure 'max online engines', 6 go sp_configure 'max online Q engines', 2 go sp_configure 'number of Q engines at startup, 2 go
MQSeries only – set the path for the MQ client shared libraries to the dynamic linker’s search path using the information in Table 2 for your platform.
Your MQ client shared library path must be correct before
you start Adaptive Server.
Setting up MQ
Create a Queue Manager and start it up. In this example, the queue manager is called QM1:
% crtmqm QM1
WebSphere MQ queue manager created. Creating or replacing default objects for QM1. Default objects statistics : 31 created. 0 replaced. 0 failed. Completing setup. Setup completed.
% strmqm QM1
WebSphere MQ queue manager 'QM1' started.
Use the MQSC tool to create a queue. This example creates a queue on the QM1 Queue Manager called Q1:
% runmqsc QM1
5724-B41 (C) Copyright IBM Corp. 1994, 2002. ALL RIGHTS RESERVED. Starting WebSphere MQ script Commands. define qlocal(Q1) 1 : define qlocal(Q1) AMQ8006: WebSphere MQ queue created. end 2 : end No MQSC commands read. No commands have a syntax error. All valid MQSC commands were processed.
Use the MQSC tool to define a server channel in the Queue Manager. This example defines a channel on QM1 called CH1:
% runmqsc QM1
5724-B41 (C) Copyright IBM Corp. 1994, 2002. ALL RIGHTS RESERVED. Starting WebSphere MQ script Commands. define channel(CH1) chltype(SVRCONN) 1 : define channel(CH1) chltype(SVRCONN) AMQ8014: WebSphere MQ channel created. end 2 : end No MQSC commands read. No commands have a syntax error. All valid MQSC commands were processed.
Add authorizations for the SYBASE user login and ASE logins. In this example, Adaptive Server runs as user “sybase,” and the Adaptive Server messaging user is “login1” and the queue is “Q1”:
% setmqaut -m QM1 -t qmgr -p sybase +connect +altusr +inq +setid % setmqaut -m QM1 -t q -n Q1 -p login1 +inq +get +browse +put
Start an MQ listener. This example starts a listener on port 8765:
% runmqlsr -t tcp -p 8765 -m QM2 &
The following shows endpoint URL for the objects created in these examples, with “myhost” as the hostname:
ibm_mq:CH1/tcp/myhost(8765)?qmgr=QM1,queue=Q1
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |