Oracle9i Supplied PL/SQL Packages and Types Reference Release 2 (9.2) Part Number A96612-01 |
|
DBMS_MGWADM, 5 of 6
This procedure alters Messaging Gateway agent parameters.
DBMS_MGWADM.ALTER_AGENT ( max_connections IN BINARY_INTEGER DEFAULT NULL, max_memory IN BINARY_INTEGER DEFAULT NULL);
The default values for configuration parameters are set when Messaging Gateway is installed.
The max_memory
parameter changes take effect the next time the gateway agent is active. If the agent is currently active, the gateway must be shut down and started for the changes to take effect.
The max_connections
parameter specifies the maximum number of JDBC messaging connections created and used by the AQ driver. This parameter is dynamically changed for a larger value only. In release 9.2, the gateway agent must be shut down and restarted before a smaller value takes effect.
This procedure configures connection information used by the Messaging Gateway agent for connections to the Oracle database.
DBMS_MGWADM.DB_CONNECT_INFO ( username IN VARCHAR2, password IN VARCHAR2, database IN VARCHAR2 DEFAULT NULL);
The gateway agent connects to the Oracle database as the user configured by this API. An Oracle administrator should create the user, grant it the role MGW_AGENT_ROLE,
and then call this procedure to configure Messaging Gateway. The MGW_AGENT_ROLE
is used to grant this user special privileges needed to access gateway configuration information stored in the database, enqueue or dequeue messages to and from Oracle queues, and perform certain AQ administration tasks.
This procedure starts the Messaging Gateway agent. It must be called before any propagation activity can take place.
DBMS_MGWADM.STARTUP( instance IN BINARY_INTEGER DEFAULT 0, force IN BINARY_INTEGER DEFAULT dbms_mgwadm.NO_FORCE);
The Messaging Gateway agent cannot be started until an agent user has been configured using DB_CONNECT_INFO
.
This procedure submits a job queue job, which starts the Messaging Gateway agent when executed. The instance
and force
parameters are used for job queue affinity, which you use to indicate whether a particular instance or any instance can run a submitted job.
This procedure shuts down the Messaging Gateway agent. No propagation activity occurs until the gateway is started.
DBMS_MGWADM.SHUTDOWN ( sdmode IN BINARY_INTEGER DEFAULT DBMS_MGWADM.SHUTDOWN_NORMAL);
Parameter | Description |
---|---|
sdmode |
The shutdown mode. Values: |
In release 9.2, the sdmode
parameter is ignored and all shutdown modes behave the same way.
This procedure cleans up Messaging Gateway. The procedure performs cleanup or recovery actions that may be needed when the gateway is left in some abnormal or unexpected condition. The MGW_GATEWAY
view lists gateway status and configuration information that pertains to the cleanup actions.
DBMS_MGWADM.CLEANUP_GATEWAY( action IN BINARY_INTEGER);
Parameter | Description |
---|---|
|
The cleanup action to be performed. Values:
|
The CLEAN_STARTUP_STATE
action involves recovery tasks that set the gateway to a known state when the gateway agent has crashed or some other abnormal event occurs so that the gateway cannot be started. This should only be done when the gateway agent has been started but appears to have crashed or has been nonresponsive for an extended period of time.
Conditions or indications where this action may be needed:
MGW_GATEWAY
view shows that the AGENT_STATUS
value is something other than NOT_STARTED
or START_SCHEDULED,
and the AGENT_PING
value is UNREACHABLE
for an extended period of time.The cleanup tasks include:
NOT_STARTED.
The following considerations apply:
NOT_STARTED
or START_SCHEDULED.
STARTING.
This procedure dynamically alters the Messaging Gateway agent logging level. The Messaging Gateway agent must be running.
DBMS_MGWADM.SET_LOG_LEVEL ( log_level IN BINARY_INTEGER);
This procedure creates a messaging system link to an MQSeries messaging system.
DBMS_MGWADM.CREATE_MSGSYSTEM_LINK( linkname IN VARCHAR2, properties IN sys.mgw_mqseries_properties, options IN sys.mgw_properties DEFAULT NULL, comment IN VARCHAR2 DEFAULT NULL);
Refer to "Basic Link Properties (MGW_MQSERIES_PROPERTIES)" for more information about messaging link properties.
This procedure alters the properties of an MQSeries messaging system link.
DBMS_MGWADM.ALTER_MSGSYSTEM_LINK ( linkname IN VARCHAR2, properties IN SYS.MGW_MQSERIES_PROPERTIES, options IN SYS.MGW_PROPERTIES DEFAULT NULL, comment IN VARCHAR2 DEFAULT DBMS_MGWADM.NO_CHANGE);
In release 9.2, the MGW_MQSERIES_PROPERTIES.MAX_CONNECTIONS
parameter specifies the maximum number of messaging connections created and used for that messaging link. This parameter is dynamically changed for a larger value only. The gateway agent must be shut down and restarted before a smaller value takes effect.
To retain an existing value for a messaging link property with a VARCHAR2
data type, specify DBMS_MGWADM.NO_CHANGE
for that particular property. To preserve an existing value for a property of another data type, specify NULL
for that property.
The options
parameter specifies a set of properties used to alter the current option properties. Each property affects the current property list in a particular manner; add a new property, replace an existing property, remove an existing property, or remove all properties.
Some properties cannot be modified and this procedure will fail if you try. Other properties can be modified only under certain conditions, depending on the current configuration; for example, when there are no propagation subscribers or schedules that have a source or destination associated with the link.
For properties that can be changed, a few are dynamic, while others require Messaging Gateway to be shut down and restarted before they take effect.
Refer to "Basic Link Properties (MGW_MQSERIES_PROPERTIES)" for more information on messaging link properties.
This procedure removes a messaging system link for a non-Oracle messaging system.
DBMS_MGWADM.REMOVE_MSGSYSTEM_LINK( linkname IN VARCHAR2);
Parameters | Description |
---|---|
linkname |
The messaging system link name |
All registered queues associated with this link must be removed before the messaging system link can be removed. This fails if there is a registered foreign (non-Oracle) queue that references this link.
This procedure registers a non-Oracle queue entity in Messaging Gateway.
DBMS_MGWADM.REGISTER_FOREIGN_QUEUE( name IN VARCHAR2, linkname IN VARCHAR2, provider_queue IN VARCHAR2 DEFAULT NULL, domain IN INTEGER DEFAULT NULL, options IN sys.mgw_properties DEFAULT NULL, comment IN VARCHAR2 DEFAULT NULL);
This procedure does not create the physical queue in the non-Oracle messaging system. The non-Oracle queue must be created using the administration tools for that messaging system.
In release 9.2, domain
is not used and must be NULL
because the domain type can be automatically determined for the messaging systems currently supported.
Refer to "Basic Link Properties (MGW_MQSERIES_PROPERTIES)" for more information on messaging link properties.
This procedure removes a non-Oracle queue entity in Messaging Gateway.
DBMS_MGWADM.UNREGISTER_FOREIGN_QUEUE( name IN VARCHAR2, linkname IN VARCHAR2);
Parameter | Description |
---|---|
name |
The queue name |
linkname |
The link name for the messaging system on which the queue exists |
This procedure does not remove the physical queue in the non-Oracle messaging system.
All subscribers and schedules referencing this queue must be removed before it can be unregistered. This fails if a subscriber or propagation schedule references the non-Oracle queue.
This procedure adds a subscriber used to consume messages from a source queue for propagation to a destination.
DBMS_MGWADM.ADD_SUBSCRIBER( subscriber_id IN VARCHAR2, propagation_type IN BINARY_INTEGER, queue_name IN VARCHAR2, destination IN VARCHAR2, rule IN VARCHAR2 DEFAULT NULL, transformation IN VARCHAR2 DEFAULT NULL, exception_queue IN VARCHAR2 DEFAULT NULL);
For OUTBOUND_PROPAGATION,
parameters are interpreted as follows:
queue_name
- specifies the local AQ queue that is the propagation source. This must have a syntax of schema.queue
.destination
- specifies the foreign queue to which messages are propagated. This must have a syntax of registered_queue@message_link.
rule
- specifies an optional AQ subscriber rule. This is NULL
if no rule is needed.transformation
- specifies the transformation used to convert the AQ payload to a gateway-defined ADT.
The gateway propagation dequeues messages from the AQ queue using the transformation to convert the AQ payload to a known gateway-defined ADT. The message is then enqueued in the foreign messaging system based on the gateway ADT.
exception_queue
- specifies the name of a local AQ queue to which messages are moved if an exception occurs. This must have a syntax of schema.queue
.For INBOUND_PROPAGATION,
parameters are interpreted as follows:
queue_name
- specifies the foreign queue that is the propagation source. This must have a syntax of registered_queue@message_link.
destination
- specifies the local AQ queue to which message are propagated. This must have a syntax of schema.queue.
rule
- specifies an optional subscriber rule that is valid for the foreign messaging system. This is NULL
if no rule is needed.transformation
- specifies the transformation used to convert a gateway-defined ADT to the AQ payload type.
The gateway propagation dequeues messages from the foreign messaging system and converts the message body to a known gateway-defined ADT. The transformation is used to convert the gateway ADT to an AQ payload type when the message is enqueued to the AQ queue.
exception_queue
- specifies the name of a foreign queue to which messages are moved if an exception occurs. This must have a syntax of registered_queue@message_link.
For OUTBOUND_PROPAGATION,
a local subscriber is added to the AQ queue. The subscriber is of the form aq$_agent(`MGW_<subscriber_id>',NULL,NULL).
For INBOUND_PROPAGATION,
whether or not a subscriber is needed depends on the requirements of the non-Oracle messaging system.
For OUTBOUND_PROPAGATION,
the exception queue has the following considerations:
NORMAL_QUEUE
rather than EXCEPTION_QUEUE.
Enqueue restrictions prevent the gateway propagation from using an AQ queue of type EXCEPTION_QUEUE
as a gateway exception queue.For INBOUND_PROPAGATION,
the exception queue has the following considerations:
This procedure alters the parameters of a subscriber used to consume messages from a source queue for propagation to a destination.
DBMS_MGWADM.ALTER_SUBSCRIBER ( subscriber_id IN VARCHAR2, rule IN VARCHAR2 DEFAULT DBMS_MGWADM.NO_CHANGE, transformation IN VARCHAR2 DEFAULT DBMS_MGWADM.NO_CHANGE, exception_queue IN VARCHAR2 DEFAULT DBMS_MGWADM.NO_CHANGE );
For a subscriber having a propagation type of OUTBOUND_PROPAGATION,
parameters are interpreted as follows:
rule
- specifies an optional AQ subscriber rule.transformation
- specifies the transformation used to convert the AQ payload to a gateway-defined ADT.
The gateway propagation dequeues messages from the AQ queue using the transformation to convert the AQ payload to a known gateway-defined ADT. The message is then enqueued in the foreign messaging system based on the gateway ADT.
exception_queue
- specifies the name of a local AQ queue to which messages are moved if an exception occurs. This must have a syntax of schema.queue
.For a subscriber having a propagation type of INBOUND_PROPAGATION,
parameters are interpreted as follows:
rule
- specifies an optional subscriber rule that is valid for the foreign messaging system.transformation
- specifies the transformation used to convert a gateway-defined ADT to the AQ payload type.
The gateway propagation dequeues messages from the foreign messaging system and converts the message body to a known gateway-defined ADT. The transformation is used to convert the gateway ADT to an AQ payload type when the message is enqueued to the AQ queue.
exception_queue
- specifies the name of a foreign queue to which messages are moved if an exception occurs. This must have a syntax of registered_queue@message_link.
For OUTBOUND_PROPAGATION,
the exception queue has the following considerations:
NORMAL_QUEUE
rather than EXCEPTION_QUEUE.
Enqueue restrictions prevent gateway propagation from using an AQ queue of type EXCEPTION_QUEUE
as a gateway exception queue.For INBOUND_PROPAGATION,
the exception queue has the following considerations:
This procedure removes a subscriber used to consume messages from a source queue for propagation to a destination.
DBMS_MGWADM.REMOVE_SUBSCRIBER ( subscriber_id IN VARCHAR2, force IN BINARY_INTEGER DEFAULT DBMS_MGWADM.NO_FORCE );
For outbound propagation, a local subscriber is removed from the AQ queue.
This procedure resets the propagation error state for a subscriber.
DBMS_MGWADM.RESET_SUBSCRIBER ( subscriber_id IN VARCHAR2 );
Parameter | Description |
---|---|
|
Identifies the subscriber |
This procedure schedules message propagation from a source to a destination. The schedule must be enabled and the gateway started in order for messages to be propagated.
DBMS_MGWADM.SCHEDULE_PROPAGATION ( schedule_id IN VARCHAR2, propagation_type IN BINARY_INTEGER, source IN VARCHAR2, destination IN VARCHAR2, start_time IN DATE DEFAULT SYSDATE, duration IN NUMBER DEFAULT NULL, next_time IN VARCHAR2 DEFAULT NULL, latency IN NUMBER DEFAULT 60 );
In release 9.2, all window parameters are ignored.
For OUTBOUND_PROPAGATION,
parameters are as follows:
source
- specifies the local AQ queue, which is the propagation source. This must have a syntax of schema.queue.
destination
- specifies the foreign queue to which messages are propagated. This must have a syntax of registered_queue@message_link.
For INBOUND_PROPAGATION,
parameters are interpreted as follows:
registered_queue@message_link.
destination
- specifies the local AQ queue to which message are propagated. This must have a syntax of schema.queue.
The schedule is set to an enabled state when it is created.
This procedure removes a propagation schedule.
DBMS_MGWADM.UNSCHEDULE_PROPAGATION ( schedule_id IN VARCHAR2 );
Parameter | Description |
---|---|
|
Identifies the propagation schedule to be removed |
This procedure alters a propagation schedule.
DBMS_MGWADM.ALTER_PROPAGATION_SCHEDULE ( schedule_id IN VARCHAR2, duration IN NUMBER DEFAULT NULL, next_time IN VARCHAR2 DEFAULT NULL, latency IN NUMBER DEFAULT 60 );
In release 9.2, propagation window parameters are ignored.
Caution: This procedure always overwrites the existing value for each parameter. If a given parameter is not specified, the existing values are overwritten with the default value. |
This procedure enables a propagation schedule.
DBMS_MGWADM.ENABLE_PROPAGATION_SCHEDULE ( schedule_id IN VARCHAR2 );
Parameter | Description |
---|---|
|
Identifies the propagation schedule to be enabled |
This procedure disables a propagation schedule.
DBMS_MGWADM.DISABLE_PROPAGATION_SCHEDULE ( schedule_id IN VARCHAR2 );
Parameter | Description |
---|---|
|
Identifies the propagation schedule to be disabled |
|
Copyright © 2000, 2002 Oracle Corporation. All Rights Reserved. |
|