105 DBMS_MGWADM
DBMS_MGWADM
defines the Messaging Gateway administrative interface. The package and object types are owned by SYS
.
Note:
You must run the catmgw.sql
script to load the Messaging Gateway packages and types into the database.
See Also:
Oracle Database Advanced Queuing User's Guide contains information on loading database objects and using DBMS_MGWADM
This chapter contains the following topics:
105.1 DBMS_MGWADM Security Model
A user with administrative privilege can run all procedures in DBMS_MGWADM
.
105.2 DBMS_MGWADM Deprecated Subprograms
Oracle recommends that you do not use deprecated procedures in new applications. Support for deprecated features is for backward compatibility only.
The following subprograms are deprecated with Oracle Database 11g Release 1 having been superseded by improved technology:
-
ADD_SUBSCRIBER Procedure - use instead CREATE_JOB Procedure
-
ALTER_PROPAGATION_SCHEDULE Procedure - use instead ALTER_JOB Procedure
-
ALTER_SUBSCRIBER Procedure - use instead ALTER_JOB Procedure
-
DB_CONNECT_INFO Procedure - use instead ALTER_AGENT Procedures
-
DISABLE_PROPAGATION_SCHEDULE Procedure - use instead DISABLE_JOB Procedure
-
ENABLE_PROPAGATION_SCHEDULE Procedure - use instead ENABLE_JOB Procedure
-
REMOVE_SUBSCRIBER Procedure - use instead REMOVE_JOB Procedure
-
RESET_SUBSCRIBER Procedure - use instead RESET_JOB Procedure
-
SCHEDULE_PROPAGATION Procedure - use instead CREATE_JOB Procedure
-
UNSCHEDULE_PROPAGATION Procedure - use instead REMOVE_JOB Procedure
105.3 DBMS_MGWADM Constants
The DBMS_MGWADM
package defines various constants for specifying parameter values.
Table 105-1 DBMS_MGWADM Constants—Cleanup Actions
Name | Type | Description |
---|---|---|
|
|
Sets the Messaging Gateway agent to a known state so that it can be started |
|
|
Messaging Gateway agent will clean log queues for all configured messaging system links |
|
|
Messaging Gateway agent recovers a Messaging Gateway subscriber that has failed due to a missing log record |
|
|
Messaging Gateway agent recovers a Messaging Gateway subscriber that has failed due to a missing persistent source message |
Table 105-2 DBMS_MGWADM Constants—Force Values
Name | Type | Description |
---|---|---|
|
|
Represents a forced action |
|
|
Represents a normal, nonforced action |
Table 105-3 DBMS_MGWADM Constants—Logging Levels
Name | Type | Description |
---|---|---|
|
|
The standard (the least) information written to the log file |
|
|
The greatest information written to the log file |
|
|
The third level of detail of logging information written to the log file |
|
|
The second level detail of logging information written to the log file |
Table 105-4 DBMS_MGWADM Constants—Named Property Constants
Name | Type | Description |
---|---|---|
|
|
A constant ( |
|
|
A constant ( |
|
|
A constant ( |
Table 105-5 DBMS_MGWADM Constants—Other Constants
Name | Type | Description |
---|---|---|
|
|
Used to indicate that JMS connections will be used to access JMS destinations in a domain-independent manner that supports a unified messaging model |
|
|
Used to indicate that JMS queue connections will be used to access JMS destinations |
|
|
Used to indicate that JMS topic connections will be used to access JMS destinations |
|
|
Indicates that an existing value should be preserved (not changed). This is used for certain APIs where the desire is to change one or more parameters but leave others unchanged. |
|
|
Name of the Messaging Gateway default agent |
Table 105-6 DBMS_MGWADM Constants—Propagation Types
Name | Type | Description |
---|---|---|
|
|
Represents the propagation type for non-Oracle to Oracle Database Advanced Queuing propagation. The propagation source is a queue in a foreign (non-Oracle) messaging system and the destination is a local Oracle Database Advanced Queuing queue. |
|
|
Represents the propagation type for Oracle Database Advanced Queuing to non-Oracle propagation. The propagation source is a local Oracle Database Advanced Queuing queue and the destination is a queue in a foreign (non-Oracle) messaging system. |
Table 105-7 DBMS_MGWADM Constants—Queue Domain Types
Name | Type | Description |
---|---|---|
|
|
Represents a queue destination. A JMS queue (point-to-point model) is classified as a queue. |
|
|
Represents a topic destination. A JMS topic (publish-subscribe model) is classified as a topic. |
Table 105-8 DBMS_MGWADM Constants—Shutdown Modes
Name | Type | Description |
---|---|---|
|
|
Represents the immediate shutdown mode |
|
|
Represents the normal shutdown mode |
Table 105-9 DBMS_MGWADM Constants—WebSphere MQ Interface Types
Name | Type | Description |
---|---|---|
|
|
Represents the Base Java interface for the WebSphere MQ messaging system |
Table 105-10 DBMS_MGWADM Constants—target_type Argument of SET_OPTION and REMOVE_OPTION Procedures
Name | Type | Description |
---|---|---|
|
|
Used for an agent option used to set a Java System property |
|
|
Used for a messaging system link option |
|
|
Used for a propagation job option |
Table 105-11 DBMS_MGWADM Constants—conntype Argument of CREATE_AGENT and ALTER_AGENT Procedures
Name | Type | Description |
---|---|---|
|
|
Used to specify the JDBC OCI driver |
|
|
Used to specify the JDBC Thin driver |
105.4 DBMS_MGWADM Data Structures
The DBMS_MGWADM
package defines several OBJECT
types.
105.4.1 DBMS_MGWADM SYS.MGW_MQSERIES_PROPERTIES Object Type
This type specifies basic properties for a WebSphere MQ messaging system link.
Syntax
TYPE SYS.MGW_MQSERIES_PROPERTIES IS OBJECT ( queue_manager VARCHAR2(64), hostname VARCHAR2(64), port INTEGER, channel VARCHAR2(64), interface_type INTEGER, username VARCHAR2(64), password VARCHAR2(64), inbound_log_queue VARCHAR2(64), outbound_log_queue VARCHAR2(64), -- Methods STATIC FUNCTION construct RETURN SYS.MGW_MQSERIES_PROPERTIES, STATIC FUNCTION alter_construct RETURN SYS.MGW_MQSERIES_PROPERTIES );
Attributes
Table 105-12 SYS.MGW_MQSERIES_PROPERTIES Attributes
Attribute | Description |
---|---|
|
The name of the WebSphere MQ queue manager |
|
The host on which the WebSphere MQ messaging system resides. If hostname is |
|
The port number. This is used only for client connections; that is, when |
|
The channel used when establishing a connection to the queue manager. This is used only for client connections; that is, when |
|
The type of messaging interface to use. Values:
|
|
The username used for authentication to the WebSphere MQ messaging system |
|
The password used for authentication to the WebSphere MQ messaging system |
|
The name of the WebSphere MQ queue used for propagation recovery purposes when this messaging link is used for inbound propagation; that is, when queues associated with this link serve as a propagation source:
|
|
The name of the WebSphere MQ queue used for propagation recovery purposes when this messaging link is used for outbound propagation; that is, when queues associated with this link serve as a propagation destination:
|
Methods
Table 105-13 SYS.MGW_MQSERIES_PROPERTIES Methods
Method | Description |
---|---|
|
Constructs a new |
|
Constructs a new |
105.4.2 DBMS_MGWADM SYS.MGW_PROPERTIES Object Type
This type specifies an array of properties.
Syntax
TYPE SYS.MGW_PROPERTIES AS VARRAY (2000) OF SYS.MGW_PROPERTY;
Attributes
Table 105-14 SYS.MGW_PROPERTIES Attributes
Attribute | Description |
---|---|
|
Property name |
|
Property value |
Usage Notes
Unless noted otherwise, Messaging Gateway uses named properties as follows:
-
Names with the
MGWPROP$_
prefix are reserved. They are used for special purposes and are invalid when used as a normal property name. -
A property name can exist only once in a property list; that is, a list can contain only one value for a given name. The name is case-insensitive.
-
In general, a property list is order-independent, and the property names may appear in any order. An alter property list is an exception.
-
You can use a new property list to alter an existing property list. Each new property modifies the original list in one of the following ways: adds a new property, modifies a property, removes a property, or removes all properties.
The alter list is processed in order, from the first element to the last element. Thus the order in which the elements appear in the alter list is meaningful, especially when the alter list is used to remove properties from an existing list.
The property name and value are used to determine how that element affects the original list. The following rules apply:
-
Add or modify property
MGW_PROPERTY.NAME = property_name MGW_PROPERTY.VALUE = property_value
If a property of the given name already exists, then the current value is replaced with the new value; otherwise the new property is added to the end of the list.
-
Remove property
MGW_PROPERTY.NAME = 'MGWPROP$_REMOVE' MGW_PROPERTY.VALUE = name_of_property_to_remove
No action is taken if the property name does not exist in the original list.
-
Remove all properties
MGW_PROPERTY.NAME = 'MGWPROP$_REMOVE_ALL' MGW_PROPERTY.VALUE = not used
See Also:
"The DBMS_MGWADM
package defines constants to represent the reserved property names on Table 105-4
105.4.3 DBMS_MGWADM SYS.MGW_PROPERTY Object Type
This type specifies a named property which is used to specify optional properties for messaging links, foreign queues, and subscribers.
Syntax
TYPE SYS.MGW_PROPERTY IS OBJECT( name VARCHAR2(500), value VARCHAR2(4000), -- Methods STATIC FUNCTION construct --- (1) RETURN SYS.MGW_PROPERTY, STATIC FUNCTION construct( --- (2) p_name IN VARCHAR2, p_value IN VARCHAR2) RETURN SYS.MGW_PROPERTY );
Attributes
Table 105-15 SYS.MGW_PROPERTY Attributes
Attribute | Description |
---|---|
|
Property name |
|
Property value |
Methods
Table 105-16 SYS.MGW_PROPERTY Methods
Method | Description |
---|---|
|
Constructs a new |
|
Constructs a new |
See Also:
"The DBMS_MGWADM
package defines constants to represent the reserved property names on Table 105-4
105.4.4 SYS.MGW_TIBRV_PROPERTIES Object Type
A type that specifies basic properties for a TIB/Rendezvous messaging system link. The Messaging Gateway agent creates a TIB/Rendezvous transport of type TibrvRvdTransport
for each Messaging Gateway link.
Syntax
TYPE SYS.MGW_TIBRV_PROPERTIES IS OBJECT( service VARCHAR2(128), daemon VARCHAR2(128), network VARCHAR2(256), cm_name VARCHAR2(256), cm_ledger VARCHAR2(256), -- Methods STATIC FUNCTION construct RETURN SYS.MGW_TIBRV_PROPERTIES, STATIC FUNCTION alter_construct RETURN SYS.MGW_TIBRV_PROPERTIES );
Attributes
Table 105-17 SYS.MGW_TIBRV_PROPERTIES Attributes
Attribute | Description |
---|---|
|
The service parameter for the rvd transport |
|
The daemon parameter for the rvd transport |
|
The network parameter for the rvd transport |
|
The CM correspondent name. Reserved for future use. |
|
The CM ledger file name. Reserved for future use. |
Methods
Table 105-18 SYS.MGW_TIBRV_PROPERTIES Methods
Method | Description |
---|---|
|
Constructs a new |
|
Constructs a new |
105.5 Summary of DBMS_MGWADM Subprograms
This table lists the DBMS_MGWADM
subprograms and briefly describes them.
Table 105-19 DBMS_MGWADM Package Subprograms
Subprogram | Description |
---|---|
Adds a subscriber used to consume messages from a source queue for propagation to a destination |
|
Alters Messaging Gateway agent parameters |
|
Alters the properties of a propagation job |
|
Alters the properties of a TIB/Rendezvous messaging system link |
|
Alters the properties of a WebSphere MQ messaging system link |
|
Alters a propagation schedule |
|
Alters the parameters of a subscriber used to consume messages from a source queue for propagation to a destination |
|
Cleans up Messaging Gateway |
|
Creates a Messaging Gateway agent that will be used to process propagation jobs |
|
Creates a job used to propagate message from a source to a destination |
|
Creates a messaging system link to a TIB/Rendezvous messaging system |
|
Creates a messaging system link to a WebSphere MQ messaging system |
|
Configures connection information used by the Messaging Gateway agent for connections to Oracle Database |
|
Disables a propagation job |
|
Disables a propagation schedule |
|
Enables a propagation job |
|
Enables a propagation schedule |
|
Registers a non-Oracle queue entity in Messaging Gateway |
|
Removes a Messaging Gateway agent |
|
Removes a propagation job |
|
Removes a messaging system link for a non-Oracle messaging system |
|
Removes a Messaging Gateway configuration option |
|
Removes a subscriber used to consume messages from a source queue for propagation to a destination |
|
Resets the propagation error state for a propagation job |
|
Resets the propagation error state for a subscriber |
|
Schedules message propagation from a source to a destination |
|
Dynamically alters the Messaging Gateway agent logging level |
|
Sets a Messaging Gateway configuration option |
|
Shuts down the Messaging Gateway agent |
|
Starts the Messaging Gateway agent |
|
Removes a non-Oracle queue entity in Messaging Gateway |
|
Removes a propagation schedule |
105.5.1 ADD_SUBSCRIBER Procedure
This procedure adds a subscriber used to consume messages from a source queue for propagation to a destination.
Note:
This subprogram has been deprecated as a result of improved technology (see CREATE_JOB Procedure), and is retained only for reasons of backward compatibility.
Syntax
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 options IN SYS.MGW_PROPERTIES DEFAULT NULL);
Parameters
Table 105-20 ADD_SUBSCRIBER Procedure Parameters
Parameter | Description |
---|---|
|
Specifies a user-defined name that identifies this subscriber |
|
Specifies the type of message propagation. |
|
Specifies the source queue to which this subscriber is being added. The syntax and interpretation of this parameter depend on the value specified for |
|
Specifies the destination queue to which messages consumed by this subscriber are propagated. The syntax and interpretation of this parameter depend on the value specified for |
|
Specifies an optional subscription rule used by the subscriber to dequeue messages from the source queue. This is |
|
Specifies the transformation needed to convert between the Oracle Database Advanced Queuing payload and an ADT defined by Messaging Gateway. The type of transformation needed depends on the value specified for If |
|
Specifies a queue used for exception message logging purposes. This queue must be on the same messaging system as the propagation source. If The source queue and exception queue cannot be the same queue. |
|
Optional subscriber properties. |
Usage Notes
See Also:
"Handling Arbitrary Payload Types Using Message Transformations", in Oracle Database Advanced Queuing User's Guide for more information regarding message conversion and transformation
If the non-Oracle messaging link being accessed for the subscriber uses a JMS interface, then the Messaging Gateway agent will use the Oracle JMS interface to access the Oracle Database Advanced Queuing queues. Otherwise the native Oracle Database Advanced Queuing interface will be used. Parameters are interpreted differently when the Messaging Gateway agent uses Oracle JMS for JMS connections.
Transformations are not currently supported if the Oracle JMS interface is used for propagation. The transformation parameter must be NULL
.
See Also:
For additional information regarding subscriber options
OUTBOUND_PROPAGATION Subscribers
The parameters for a subscriber used for outbound propagation are interpreted as follows:
-
queue_name
specifies the local Oracle Database Advanced Queuing queue that is the propagation source. This must have a syntax ofschema.queue
. -
destination
specifies the foreign queue to which messages are propagated. This must have a syntax ofregistered_queue@message_link
. -
rule
specifies an optional Oracle Database Advanced Queuing subscriber rule if the native Oracle Database Advanced Queuing interface is used, or a JMS selector if the Oracle JMS interface is used. IfNULL
, then no rule or selector is used. -
transformation
specifies the transformation used to convert the Oracle Database Advanced Queuing payload to an ADT defined by Messaging Gateway.Messaging Gateway propagation dequeues messages from the Oracle Database Advanced Queuing queue using the transformation to convert the Oracle Database Advanced Queuing payload to a known ADT defined by Messaging Gateway. The message is then enqueued in the foreign messaging system based on the Messaging Gateway ADT.
-
exception_queue
specifies the name of a local Oracle Database Advanced Queuing queue to which messages are moved if an exception occurs. This must have a syntax ofschema.queue
.
If the native Oracle Database Advanced Queuing interface is used, then a subscriber will be added to the Oracle Database Advanced Queuing queue when this procedure is called, whether or not Messaging Gateway is running. The local subscriber will be of the form sys.aq$_agent('MGW_
subscriber_id
'
, NULL,
NULL)
.
If the Oracle JMS interface is used, then the Messaging Gateway agent will create a JMS durable subscriber with the name of MGW_
subscriber_id
. If the agent is not running when this procedure is called, then the durable subscriber will be created the next time the agent starts.
The exception queue has the following caveats:
-
The user is responsible for creating the Oracle Database Advanced Queuing queue to be used as the exception queue.
-
The payload type of the source and exception queue must match.
-
The exception queue must be created as a queue type of
DBMS_AQADM.NORMAL_QUEUE
rather thanDBMS_AQADM.EXCEPTION_QUEUE
. Enqueue restrictions prevent Messaging Gateway propagation from using an Oracle Database Advanced Queuing queue of typeEXCEPTION_QUEUE
as a Messaging Gateway exception queue.
INBOUND_PROPAGATION Subscribers
The parameters for a subscriber used for inbound propagation are interpreted as follows:
-
queue_name
specifies the foreign queue that is the propagation source. This must have a syntax ofregistered_queue@message_link
. -
destination
specifies the local Oracle Database Advanced Queuing queue to which messages are propagated. This must have a syntax ofschema.queue
. -
rule
specifies an optional subscriber rule that is valid for the foreign messaging system. This isNULL
if no rule is needed. -
transformation
specifies the transformation used to convert an ADT defined by Messaging Gateway to the Oracle Database Advanced Queuing payload type.Messaging Gateway propagation dequeues messages from the foreign messaging system and converts the message body to a known ADT defined by Messaging Gateway. The transformation is used to convert the Messaging Gateway ADT to an Oracle Database Advanced Queuing payload type when the message is enqueued to the Oracle Database Advanced Queuing queue.
-
exception_queue
specifies the name of a foreign queue to which messages are moved if an exception occurs. This must have a syntax ofregistered_queue@message_link
.
Whether or not a subscriber is needed depends on the requirements of the non-Oracle messaging system. If a durable subscriber is necessary, then it will be created by the Messaging Gateway agent. If the agent is not running at the time this procedure is called, then the creation of the subscriber on the non-Oracle messaging system will occur when the agent next starts.
The exception queue has the following caveats:
-
The exception queue must be a registered non-Oracle queue.
-
The source and exception queues must use the same messaging system link.
105.5.2 ALTER_AGENT Procedures
This procedure configures Messaging Gateway agent parameters.
Syntax
DBMS_MGWADM.ALTER_AGENT ( max_memory IN BINARY_INTEGER DEFAULT NULL, max_threads IN BINARY_INTEGER DEFAULT NULL, service IN VARCHAR2 DEFAULT DBMS_MGWADM.NO_CHANGE );
DBMS_MGWADM.ALTER_AGENT ( agent_name IN VARCHAR2, username IN VARCHAR2 DEFAULT DBMS_MGWADM.NO_CHANGE, password IN VARCHAR2 DEFAULT DBMS_MGWADM.NO_CHANGE, database IN VARCHAR2 DEFAULT DBMS_MGWADM.NO_CHANGE, conntype IN VARCHAR2 DEFAULT DBMS_MGWADM.NO_CHANGE, max_memory IN PLS_INTEGER DEFAULT NULL, max_threads IN PLS_INTEGER DEFAULT NULL, service IN VARCHAR2 DEFAULT DBMS_MGWADM.NO_CHANGE, initfile IN VARCHAR2 DEFAULT DBMS_MGWADM.NO_CHANGE, comment IN VARCHAR2 DEFAULT DBMS_MGWADM.NO_CHANGE );
Parameters
Table 105-21 ALTER_AGENT Procedure Parameters
Parameter | Description |
---|---|
|
The maximum heap size, in MB, used by the Messaging Gateway agent. If it is |
|
The number of messaging threads that the Messaging Gateway agent creates. If it is |
|
Specifies the database service that the Oracle Scheduler job class used by this agent will have affinity to. In an Oracle RAC environment, this means that the Messaging Gateway agent will run on only those database instances that are assigned to the service. If |
|
Identifies the Messaging Gateway agent. |
|
Specifies the username used for connections to the Oracle Database. |
|
Specifies the password used for connections to the Oracle Database. |
|
Specifies the database connect string used for connections to the Oracle Database. |
|
Specifies the type of connection to the Oracle Database, |
|
Specifies a Messaging Gateway initialization file used by this agent. |
|
Optional comments for this agent. |
Usage Notes
-
Default values for these configuration parameters are set when the Messaging Gateway agent is installed.
-
Changes to the
max_memory
andmax_threads
parameters take effect the next time the Messaging Gateway agent is active. If the Messaging Gateway agent is currently active, then it must be shut down and restarted for the changes to take effect. -
The
service
parameter is used to set an Oracle Scheduler job class attribute. The job class is used to create a Scheduler job that starts the Messaging Gateway agent. An Oracle administrator must create the database service. If the value is NULL, the job class will belong to an internal service that is mapped to all instances. -
The
username
,password
, anddatabase
parameters specify connection information used by the Messaging Gateway agent for connections to the Oracle Database. An Oracle administrator should create the user and grant it the roleMGW_AGENT_ROLE
.
105.5.3 ALTER_JOB Procedure
This procedure alters the properties of a propagation job.
Syntax
DBMS_MGWADM.ALTER_JOB ( job_name 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, poll_interval IN PLS_INTEGER DEFAULT 0, options IN SYS.MGW_PROPERTIES DEFAULT NULL, comments IN VARCHAR2 DEFAULT DBMS_MGWADM.NO_CHANGE );
Parameters
Table 105-22 ALTER_JOB Procedure Parameters
Parameter | Description |
---|---|
|
Identifies the propagation job |
|
Specifies an optional subscription rule used to dequeue messages from the propagation source. The syntax and interpretation of this parameter depend on the propagation type. A |
|
Specifies the transformation needed to convert between the Oracle Streams AQ payload and an ADT defined by Messaging Gateway. The type of transformation needed depends on the value specified for A |
|
Specifies a queue used for exception message logging purposes. This queue must be on the same messaging system as the propagation source. In cases in which no exception queue is associated with the job, propagation stops if a problem occurs. The syntax and interpretation of this parameter depend on the propagation type. A |
|
Specifies the polling interval, in seconds, used by the Messaging Gateway agent when checking for messages in the source queue. If no messages are available the agent will not poll again until the polling interval has passed. Once the agent detects a message it will continue propagating messages as long as any are available. Values:
|
|
Optional job properties. If |
|
An optional comment for this agent, or |
Usage Notes
-
If the non-Oracle messaging link being accessed for the propagation job uses a JMS interface, then the Messaging Gateway agent will use the Oracle JMS interface to access the Oracle Streams AQ queues. Otherwise the native Oracle Streams AQ interface will be used. Parameters are interpreted differently when the Messaging Gateway agent uses Oracle JMS for JMS connections.
-
The subscriber rule cannot be altered when propagating from a JMS source. Instead, the propagation job must be dropped and re-created with the new rule. For JMS, changing the message selector on a durable subscription is equivalent to deleting and re-creating the subscription.
-
Transformations are not currently supported if the Oracle JMS interface is used for propagation. The transformation parameter must be
DBMS_MGWADM
.NO_CHANGE
(the default value). -
The options parameter specifies a set of properties used to alter the current optional 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.
Note:
-
SYS.MGW_PROPERTY Object Type for more information about the options parameter
-
OUTBOUND_PROPAGATION Jobs for outbound propagation parameter interpretation
-
INBOUND_PROPAGATION Jobs for inbound propagation parameter interpretation
105.5.4 ALTER_MSGSYSTEM_LINK Procedure for TIB/Rendezvous
This procedure alters the properties of a TIB/Rendezvous messaging system link.
Syntax
DBMS_MGWADM.ALTER_MSGSYSTEM_LINK ( linkname IN VARCHAR2, properties IN SYS.MGW_TIBRV_PROPERTIES, options IN SYS.MGW_PROPERTIES DEFAULT NULL, comment IN VARCHAR2 DEFAULT DBMS_MGWADM.NO_CHANGE );
Parameters
Table 105-23 ALTER_MSGSYSTEM_LINK Procedure Parameters for TIB/Rendezvous
Parameters | Description |
---|---|
|
The messaging system link name |
|
Basic properties for a TIB/Rendezvous messaging system link. If |
|
Optional link properties. If |
|
A user-specified description, or |
Usage Notes
To retain an existing value for a messaging link property with a VARCHAR2
datatype, specify DBMS_MGWADM.NO_CHANGE
for that particular property. To preserve an existing value for a property of another datatype, specify NULL
for that property.
The options
parameter specifies a set of properties used to alter the current optional 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.
See Also:
Some properties cannot be modified, and this procedure will fail if an attempt is made to alter such a property. For properties and options that can be changed, a few are dynamic, and Messaging Gateway uses the new values immediately. Others require the Messaging Gateway agent to be shut down and restarted before they take effect.
See Also:
"TIB/Rendezvous System Properties" in Oracle Database Advanced Queuing User's Guide for more information about the messaging system properties and options
105.5.5 ALTER_MSGSYSTEM_LINK Procedure for WebSphere MQ
This procedure alters the properties of a WebSphere MQ messaging system link.
Syntax
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);
Parameters
Table 105-24 ALTER_MSGSYSTEM_LINK Procedure Parameters for WebSphere MQ
Parameters | Description |
---|---|
|
The messaging system link name |
|
Basic properties for a WebSphere MQ messaging system link. If it is |
|
Optional link properties. |
|
An optional description or |
Usage Notes
To retain an existing value for a messaging link property with a VARCHAR2
datatype, specify DBMS_MGWADM.NO_CHANGE
for that particular property. To preserve an existing value for a property of another datatype, specify NULL
for that property.
The options
parameter specifies a set of properties used to alter the current optional 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.
See Also:
Some properties cannot be modified, and this procedure will fail if an attempt is made to alter such a property. For properties and options that can be changed, a few are dynamic, and Messaging Gateway uses the new values immediately. Others require the Messaging Gateway agent to be shut down and restarted before they take effect.
See Also:
"WebSphere MQ System Properties" in Oracle Database Advanced Queuing User's Guide for more information about the messaging system properties and options
105.5.6 ALTER_PROPAGATION_SCHEDULE Procedure
This procedure alters a propagation schedule.
Note:
This subprogram has been deprecated as a result of improved technology (see ALTER_JOB Procedure), and is retained only for reasons of backward compatibility.
Syntax
DBMS_MGWADM.ALTER_PROPAGATION_SCHEDULE ( schedule_id IN VARCHAR2, duration IN NUMBER DEFAULT NULL, next_time IN VARCHAR2 DEFAULT NULL, latency IN NUMBER DEFAULT NULL);
Parameters
Table 105-25 ALTER_PROPAGATION_SCHEDULE Procedure Parameters
Parameter | Description |
---|---|
|
Identifies the propagation schedule to be altered |
|
Reserved for future use |
|
Reserved for future use |
|
Specifies the polling interval, in seconds, used by the Messaging Gateway agent when checking for messages in the source queue. If no messages are available in the source queue, then the agent will not poll again until the polling interval has passed. Once the agent detects a message it will continue propagating messages as long as any are available. Values: |
Usage Notes
This procedure always overwrites the existing value for each parameter. If a given parameter is not specified, then the existing values are overwritten with the default value.
105.5.7 ALTER_SUBSCRIBER Procedure
This procedure alters the parameters of a subscriber used to consume messages from a source queue for propagation to a destination.
Note:
This subprogram has been deprecated as a result of improved technology (see ALTER_JOB Procedure ), and is retained only for reasons of backward compatibility.
Syntax
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, options IN SYS.MGW_PROPERTIES DEFAULT NULL );
Parameters
Table 105-26 ALTER_SUBSCRIBER Procedure Parameters
Parameter | Description |
---|---|
|
Identifies the subscriber to be altered |
|
Specifies an optional subscription rule used by the subscriber to dequeue messages from the source queue. The syntax and interpretation of this parameter depend on the subscriber propagation type. A |
|
Specifies the transformation needed to convert between the Oracle Database Advanced Queuing payload and an ADT defined by Messaging Gateway. The type of transformation needed depends on the subscriber propagation type. A |
|
Specifies a queue used for exception message logging. This queue must be on the same messaging system as the propagation source. If no exception queue is associated with the subscriber, then propagation stops if a problem occurs. The syntax and interpretation of this parameter depend on the subscriber propagation type. A The source queue and exception queue cannot be the same queue. |
|
Optional subscriber properties. If |
Usage Notes
If the non-Oracle messaging link being accessed for the subscriber uses a JMS interface, then the Messaging Gateway agent will use the Oracle JMS interface to access the Oracle Database Advanced Queuing queues. Otherwise the native Oracle Database Advanced Queuing interface will be used. Parameters are interpreted differently when the Messaging Gateway agent uses Oracle JMS for JMS connections.
When propagating from a JMS source, the subscriber rule cannot be altered. Instead, the subscriber must be removed and added with the new rule. For JMS, changing the message selector on a durable subscription is equivalent to deleting and re-creating the subscription.
Transformations are not currently supported if the Oracle JMS interface is used for propagation. The transformation parameter must be DBMS_MGWADM.NO_CHANGE
(the default value).
The options
parameter specifies a set of properties used to alter the current optional 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.
See Also:
-
SYS.MGW_PROPERTIES Object Type for more information on the options parameter
-
"WebSphere MQ System Properties" in Oracle Database Advanced Queuing User's Guide for more information about WebSphere MQ subscriber options
-
"TIB/Rendezvous System Properties" in Oracle Database Advanced Queuing User's Guide for more information about TIB/Rendezvous subscriber options
-
"OUTBOUND_PROPAGATION Subscribers for outbound propagation parameter interpretation
-
"INBOUND_PROPAGATION Subscribers for inbound propagation parameter interpretation
105.5.8 CLEANUP_GATEWAY Procedures
This procedure cleans up Messaging Gateway. The procedure performs cleanup or recovery actions that may be needed when Messaging Gateway is left in some abnormal or unexpected condition. The MGW_GATEWAY
view lists Messaging Gateway status and configuration information that pertains to the cleanup actions.
Syntax
DBMS_MGWADM.CLEANUP_GATEWAY( action IN BINARY_INTEGER, sarg IN VARCHAR2 DEFAULT NULL);
DBMS_MGWADM.CLEANUP_GATEWAY( agent_name IN VARCHAR2, action IN BINARY_INTEGER, sarg IN VARCHAR2 DEFAULT NULL );
Parameters
Table 105-27 CLEANUP_GATEWAY Procedure Parameters
Parameter | Description |
---|---|
|
The cleanup action to be performed. Values:
|
|
Optional argument whose meaning depends on the value specified for |
|
Identifies the Messaging Gateway agent. |
Usage Notes
CLEAN_STARTUP_STATE
sarg
is not used and must be NULL
.
The CLEAN_STARTUP_STATE
action recovers Messaging Gateway to a known state when the Messaging Gateway agent has crashed or some other abnormal event occurs, and Messaging Gateway cannot be restarted. This should be done only when the Messaging Gateway agent has been started but appears to have crashed or has been nonresponsive for an extended period of time.
The CLEAN_STARTUP_STATE
action may be needed when the 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.
If the AGENT_STATUS
value is BROKEN
, then the Messaging Gateway agent cannot be started until the problem has been resolved and the CLEAN_STARTUP_STATE
action used to reset the agent status. A BROKEN
status can indicate that the Messaging Gateway start job detected a Messaging Gateway agent already running. This condition that should never occur under normal use.
Cleanup tasks include:
-
Removing the Scheduler job used to start the external Messaging Gateway agent process.
-
Setting certain configuration information to a known state. For example, setting the agent status to
NOT_STARTED.
Execution of this command fails if:
-
The agent status is
NOT_STARTED
orSTART_SCHEDULED.
-
No shutdown attempt has been made prior to calling this procedure, except if the agent status is
STARTING.
-
The Messaging Gateway agent is successfully contacted.
The assumption is that the agent is active, and this procedure fails. If the agent does not respond after several attempts have been made, then the cleanup tasks are performed. This procedure takes at least several seconds and possibly up to one minute. This is expected behavior under conditions where this particular cleanup action is appropriate and necessary.
Note:
Terminate any Messaging Gateway agent process that may still be running after a CLEAN_STARTUP_STATE
action has been successfully performed. This should be done before calling DBMS_MGWADM
.STARTUP
to start Messaging Gateway. The process is usually named extprocmgwextproc
.
CLEAN_LOG_QUEUES
sarg
is not used and must be NULL
.
The Messaging Gateway agent will clean log queues for all configured messaging system links. The agent will temporarily stop all propagation activity and then remove all obsolete and bad log records from the log queues for all links. The procedure will fail if the Messaging Gateway agent is not running.
This cleanup action is automatically performed each time the Messaging Gateway agent is started.
Note:
The CLEAN_LOG_QUEUES
action is performed only on agent startup. If this procedure is called when the agent is running, then the Messaging Gateway agent ignores it.
RESET_SUB_MISSING_LOG_REC
sarg
specifies a Messaging Gateway job name (or subscriber ID) to be reset. It must not be NULL
.
The Messaging Gateway agent recovers a Messaging Gateway propagation job that has failed due to a missing log record. The agent will reset the source and destination log records. The procedure will fail if the Messaging Gateway agent is not running.
Note:
If the messages in the source queue had already been propagated to the destination queue, then this action may result in duplicate messages.
RESET_SUB_MISSING_MESSAGE
sarg
specifies a Messaging Gateway job name (or subscriber ID) to be reset. It must not be NULL
.
The Messaging Gateway agent recovers a Messaging Gateway propagation job that has failed due to a missing persistent source message. The agent will treat the message as a non-persistent message and continue processing that propagation job. The procedure will fail if the Messaging Gateway agent is not running.
105.5.9 CREATE_AGENT Procedure
This procedure creates a Messaging Gateway agent that will be used to process propagation jobs.
Syntax
DBMS_MGWADM.CREATE_AGENT ( agent_name IN VARCHAR2, username IN VARCHAR2 DEFAULT NULL, password IN VARCHAR2 DEFAULT NULL, database IN VARCHAR2 DEFAULT NULL, conntype IN VARCHAR2 DEFAULT DBMS_MGWADM.JDBC_OCI, max_memory IN PLS_INTEGER DEFAULT 64, max_threads IN PLS_INTEGER DEFAULT 1, service IN VARCHAR2 DEFAULT NULL, initfile IN VARCHAR2 DEFAULT NULL, comment IN VARCHAR2 DEFAULT NULL );
Parameters
Table 105-28 CREATE_AGENT Procedure Parameters
Parameter | Description |
---|---|
|
A name used to identify the agent |
|
Specifies the username used for connections to the Oracle Database |
|
Specifies the password used for connections to the Oracle Database. A password must be specified if a username is specified. |
|
Specifies the database connect string used for connections to the Oracle Database. |
|
Specifies the type of connection to the Oracle Database.Values: |
|
Specifies the maximum heap size, in MB, used by the Messaging Gateway agent |
|
Specifies the number of messaging threads that the Messaging Gateway agent creates. This determines the number of propagation jobs that the agent can concurrently process. The maximum value of |
|
Specifies the database service that the Oracle Scheduler job class used by this agent will have affinity to. In an Oracle RAC environment, this means that the Messaging Gateway agent will only run on those database instances that are assigned to the service. If NULL, then the job class will belong to the default service which is mapped to every instance. |
|
Specifies a Messaging Gateway initialization file used by this agent. NULL indicates that the default initialization file is used. If a value is specified, it should be the full path name of the file. |
|
An optional comment for this agent. |
Usage Notes
-
The Messaging Gateway automatically configures a default agent when Messaging Gateway is installed. The name of the default agent is
DEFAULT_AGENT
. This procedure can be used to create additional agents. -
The
username
,password
, anddatabase
parameters specify connection information used by the Messaging Gateway agent for connections to the Oracle Database. An Oracle administrator should create the database user and grant it the roleMGW_AGENT_ROLE
. It is not mandatory that the connection information be specified when this procedure is called but it must be set before the agent can be started. -
The
service
parameter is used to create an Oracle Scheduler job class. The job class is used to create a Scheduler job that starts the Messaging Gateway agent. An Oracle administrator must create the database service. If the value isNULL
, the job class will belong to an internal service that is mapped to all instances.
105.5.10 CREATE_JOB Procedure
This procedure creates a job used to propagate message from a source to a destination.
Syntax
DBMS_MGWADM.CREATE_JOB ( job_name IN VARCHAR2, propagation_type IN PLS_INTEGER, source IN VARCHAR2, destination IN VARCHAR2, rule IN VARCHAR2 DEFAULT NULL, transformation IN VARCHAR2 DEFAULT NULL, exception_queue IN VARCHAR2 DEFAULT NULL, poll_interval IN PLS_INTEGER DEFAULT NULL, options IN SYS.MGW_PROPERTIES DEFAULT NULL, enabled IN BOOLEAN DEFAULT TRUE, comments IN VARCHAR2 DEFAULT NULL);
Parameters
Table 105-29 CREATE_JOB Procedure Parameters
Parameter | Description |
---|---|
|
A user defined name to identify the propagation job |
|
Specifies the type of message propagation.
|
|
Specifies the source queue whose messages are to be propagated. The syntax and interpretation of this parameter depend on the value specified for |
|
Specifies the destination queue to which messages are propagated. The syntax and interpretation of this parameter depend on the value specified for |
|
Specifies an optional subscription rule used to dequeue messages from the source queue. This should be |
|
Specifies the transformation needed to convert between the Oracle Streams AQ payload and an ADT defined by Messaging Gateway. The type of transformation needed depends on the value specified for If no transformation is specified the Oracle Streams AQ payload type must be supported by Messaging Gateway. |
|
Specifies a queue used for exception message logging purposes. This queue must be on the same messaging system as the propagation source. If The source queue and exception queue cannot be the same queue. |
|
Specifies the polling interval, in seconds, used by the Messaging Gateway agent when checking for messages in the source queue. If no messages are available the agent will not poll again until the polling interval has passed. Once the agent detects a message it will continue propagating messages as long as any are available. Values: |
|
Optional job properties, |
|
Specifies whether this propagation job is enabled after creation. Values:
|
|
An optional comment for this job. |
Usage Notes
-
The job must be enabled and Messaging Gateway agent started in order for messages to be propagated.
-
If the non-Oracle messaging link being accessed for the propagation job uses a JMS interface, then the Messaging Gateway agent will use the Oracle JMS interface to access the Oracle Streams AQ queues. Otherwise the native Oracle Streams AQ interface will be used. Parameters are interpreted differently when the Messaging Gateway agent uses Oracle JMS for JMS connections.
-
Transformations are not currently supported if the Oracle JMS interface is used for propagation. The transformation parameter must be
NULL
.
OUTBOUND_PROPAGATION Jobs
The parameters for an outbound propagation job are interpreted as follows:
-
source
specifies the local Oracle Streams AQ queue that is the propagation source. This must have syntax of schema.queue. This can be either a multiple consumer queue or a single consumer queue. -
destination
specifies the non-Oracle queue to which messages are propagated. This must have syntax ofregistered_queue
@message_link
. -
rule
specifies an optional Oracle Streams AQ subscriber rule if the native Oracle Stream AQ interface is used, or a JMS selector if the Oracle JMS interface is used. IfNULL
, then no rule or selector is used. This parameter must beNULL
if the native Oracle Stream AQ interface is used and the propagation source is a single consumer queue. -
transformation
specifies the transformation used to convert the Oracle Streams AQ payload to an ADT defined by Messaging Gateway. The full transformation name (schema
.name
) should be used if one is specified.Messaging Gateway propagation dequeues messages from the Oracle Streams AQ queue using the transformation to convert the Oracle Streams AQ payload to a known ADT defined by Messaging Gateway. The message is then enqueued in the non-Oracle messaging system based on the Messaging Gateway ADT.
-
exception_queue
specifies the name of a local Oracle Streams AQ queue to which messages are moved if an exception occurs. The syntax must beschema
.queue
.If the native Oracle Streams AQ interface is used and the source is a multiple consumer queue, then a subscriber will be added to the Oracle Streams AQ queue when this procedure is called, whether or not the Messaging Gateway agent is running. The local subscriber will be of the form
sys
.aq$_agent
('MGW_job_name
',NULL
,NULL
).If the Oracle JMS interface is used, then the Messaging Gateway agent will create a JMS durable subscriber with the name of
MGW_job_name
. If the agent is not running when this procedure is called, then the durable subscriber will be created the next time the agent starts.The exception queue has the following conditions:
-
The user is responsible for creating the Oracle Streams AQ queue to be used as the exception queue.
-
The payload type of the source queue and exception queue must match.
-
The exception queue must be created as a queue type of
DBMS_AQADM
.NORMAL_QUEUE
. Enqueue restrictions prevent Messaging Gateway from using an Oracle Streams AQ queue of typeDBMS_AQADM
.EXCEPTION_QUEUE
as a Messaging Gateway exception queue.
-
INBOUND_PROPAGATION Jobs
The parameters for an inbound propagation job are interpreted as follows:
-
source
specifies the non-Oracle queue that is the propagation source. The syntax must beregistered_queue
@message_link
. -
destination
specifies the local Oracle Streams AQ queue to which messages are propagated. The syntax must beschema
.queue
. -
rule
specifies an optional subscriber rule that is valid for the non-Oracle messaging system. This should beNULL
if no rule is needed. -
transformation
specifies the transformation used to convert an ADT defined by Messaging Gateway to the Oracle Streams AQ payload type. The full transformation name (schema
.name
) should be used if one is specifiedMessaging Gateway propagation dequeues messages from the non-Oracle messaging system and converts the message body to a known ADT defined by Messaging Gateway. The transformation is used to convert the Messaging Gateway ADT to an Oracle Streams AQ payload type when the message is enqueued to the Oracle Streams AQ queue.
-
exception_queue
specifies the name of a registered non-Oracle queue to which messages are moved if an exception occurs. The syntax must beregistered_queue@message_link
.Whether or not a subscriber is needed for the source queue depends on the requirements of the non-Oracle messaging system. If a durable subscriber is necessary, then the Messaging Gateway agent will create it. If the agent is not running when this procedure is called, then the subscriber will be created on the non-Oracle messaging system the next time the agent starts.
The exception queue has the following conditions:
-
The exception queue must be a registered non-Oracle queue.
-
The source queue and exception queue must use the same messaging system link.
-
105.5.11 CREATE_MSGSYSTEM_LINK Procedures for TIB/Rendezvous
This procedure creates a link to a TIB/Rendezvous messaging system.
Syntax
DBMS_MGWADM.CREATE_MSGSYSTEM_LINK ( linkname IN VARCHAR2, properties IN SYS.MGW_TIBRV_PROPERTIES, options IN SYS.MGW_PROPERTIES DEFAULT NULL, comment IN VARCHAR2 DEFAULT NULL );
DBMS_MGWADM.CREATE_MSGSYSTEM_LINK ( linkname IN VARCHAR2, agent_name IN VARCHAR2, properties IN SYS.MGW_TIBRV_PROPERTIES, options IN SYS.MGW_PROPERTIES DEFAULT NULL, comment IN VARCHAR2 DEFAULT NULL );
Parameters
Table 105-30 CREATE_MSGSYSTEM_LINK Procedure Parameters for TIB/Rendezvous
Parameter | Description |
---|---|
|
A user-defined name to identify this messaging system link |
|
Basic properties of a TIB/Rendezvous messaging system link. |
|
Optional link properties. |
|
A user-specified description. |
|
Specifies the Messaging Gateway agent that will be used to process all propagation jobs associated with this link. |
Usage Notes
The Messaging Gateway default agent will process the propagation jobs associated with this link if an agent name is not specified.
See Also:
"TIB/Rendezvous System Properties" in Oracle Database Advanced Queuing User's Guide for more information about the messaging system properties and options
105.5.12 CREATE_MSGSYSTEM_LINK Procedures for WebSphere MQ
This procedure creates a messaging system link to a WebSphere MQ messaging system.
Syntax
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);
DBMS_MGWADM.CREATE_MSGSYSTEM_LINK( linkname IN VARCHAR2, agent_name IN VARCHAR2, properties IN SYS.MGW_MQSERIES_PROPERTIES, options IN SYS.MGW_PROPERTIES DEFAULT NULL, comment IN VARCHAR2 DEFAULT NULL);
Parameters
Table 105-31 CREATE_MSGSYSTEM_LINK Procedure Parameters for WebSphere MQ
Parameter | Description |
---|---|
|
A user-defined name to identify the messaging system link |
|
Basic properties of a WebSphere MQ messaging system link |
|
Optional link properties. |
|
A user-specified description. |
|
Specifies the Messaging Gateway agent that will be used to process all propagation jobs associated with this link. |
Usage Notes
The Messaging Gateway default agent will process the propagation jobs associated with this link if an agent name is not specified.
See Also:
"WebSphere MQ System Properties" in Oracle Database Advanced Queuing User's Guide for more information about the messaging system properties and options
105.5.13 DB_CONNECT_INFO Procedure
This deprecated procedure configures connection information used by the Messaging Gateway default agent for connections to Oracle Database.
Note:
This subprogram has been deprecated as a result of improved technology (see ALTER_AGENT Procedures), and is retained only for reasons of backward compatibility.
Syntax
DBMS_MGWADM.DB_CONNECT_INFO ( username IN VARCHAR2, password IN VARCHAR2, database IN VARCHAR2 DEFAULT NULL);
Parameters
Table 105-32 DB_CONNECT_INFO Procedure Parameters
Parameter | Description |
---|---|
|
The username used for connections to Oracle Database. |
|
The password used for connections to Oracle Database. |
|
The database connect string used by the Messaging Gateway agent. Oracle strongly recommends that a not |
Usage Notes
The Messaging Gateway agent connects to Oracle Database as the user configured by this procedure. An Oracle administrator should create the user, grant it the role MGW_AGENT_ROLE,
and then call this procedure to configure Messaging Gateway. Role MGW_AGENT_ROLE
is used to grant this user special privileges needed to access Messaging Gateway configuration information stored in the database, enqueue or dequeue messages to and from Oracle Database Advanced Queuing queues, and perform certain Oracle Database Advanced Queuing administration tasks.
105.5.14 DISABLE_JOB Procedure
This procedure disables a propagation job.
Syntax
DBMS_MGWADM.DISABLE_JOB ( job_name IN VARCHAR2);
Parameters
Table 105-33 DISABLE_JOB Procedure Parameters
Parameter | Description |
---|---|
job_name |
Identifies the propagation job |
105.5.15 DISABLE_PROPAGATION_SCHEDULE Procedure
This deprecated procedure disables a propagation schedule.
Note:
This subprogram has been deprecated as a result of improved technology (see DISABLE_JOB Procedure), and is retained only for reasons of backward compatibility.
Syntax
DBMS_MGWADM.DISABLE_PROPAGATION_SCHEDULE ( schedule_id IN VARCHAR2);
Parameters
Table 105-34 DISABLE_PROPAGATION_SCHEDULE Procedure Parameters
Parameter | Description |
---|---|
|
Identifies the propagation schedule to be disabled |
105.5.16 ENABLE_JOB Procedure
This procedure enables a propagation job.
Syntax
DBMS_MGWADM.ENABLE_JOB ( job_name IN VARCHAR2 );
Parameters
Table 105-35 ENABLE_JOB Procedure Parameters
Parameter | Description |
---|---|
|
Identifies the propagation job |
105.5.17 ENABLE_PROPAGATION_SCHEDULE Procedure
This deprecated procedure enables a propagation schedule.
Note:
This subprogram has been deprecated as a result of improved technology (see ENABLE_JOB Procedure), and is retained only for reasons of backward compatibility.
Syntax
DBMS_MGWADM.ENABLE_PROPAGATION_SCHEDULE ( schedule_id IN VARCHAR2 );
Parameters
Table 105-36 ENABLE_PROPAGATION_SCHEDULE Procedure Parameters
Parameter | Description |
---|---|
|
Identifies the propagation schedule to be enabled |
105.5.18 REGISTER_FOREIGN_QUEUE Procedure
This procedure registers a non-Oracle queue entity in Messaging Gateway.
Syntax
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);
Parameters
Table 105-37 REGISTER_FOREIGN_QUEUE Procedure Parameters
Parameters | Description |
---|---|
|
The registered queue name. This name identifies the foreign queue within Messaging Gateway and need not match the name of the queue in the foreign messaging system. |
|
The link name for the messaging system on which this queue exists |
|
The message provider (native) queue name. If |
|
The domain type of the queue. |
|
Optional queue properties |
|
A user-specified description. Can be |
Usage Notes
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.
See Also:
For more information when registering queues for the WebSphere MQ messaging system or the TIB/Rendezvous messaging system, specifically "Optional Foreign Queue Configuration Properties" in Oracle Database Advanced Queuing User's Guide.
105.5.19 REMOVE_AGENT Procedure
This procedure removes a Messaging Gateway agent.
Syntax
DBMS_MGWADM.REMOVE_AGENT( agent_name IN VARCHAR2 );
Parameters
Table 105-38 REMOVE_AGENT Procedure Parameters
Parameters | Description |
---|---|
|
Identifies the Messaging Gateway agent |
Usage Notes
All messaging system links associated with this Messaging Gateway agent must be removed and the agent must be stopped before it can be removed. The Messaging Gateway default agent cannot be removed.
105.5.20 REMOVE_JOB Procedure
This procedure removes a propagation job.
Syntax
DBMS_MGWADM.REMOVE_JOB( job_name IN VARCHAR2, force IN PLS_INTEGER DEFAULT DBMS_MGWADM.NO_FORCE);
Parameters
Table 105-39 REMOVE_JOB Procedure Parameters
Parameters | Description |
---|---|
|
Identifies the propagation job |
force |
Specifies whether the procedure should succeed even if Messaging Gateway is not able to perform all cleanup actions pertaining to this propagation job. Values:
|
Usage Notes
-
The Messaging Gateway agent uses various resources of the Oracle Database and the non-Oracle messaging system for its propagation work. These resources need to be released when the job is removed. For example, Messaging Gateway may create a durable subscriber on the source queue that should be removed when the job is removed. Therefore, this procedure should normally be called when the Messaging Gateway agent is running and able to access the non-Oracle messaging system associated with this job.
-
For outbound propagation, a local subscriber is removed from the Oracle Streams AQ queue when the propagation source is a multiple consumer queue.
105.5.21 REMOVE_MSGSYSTEM_LINK Procedure
This procedure removes a messaging system link for a non-Oracle messaging system.
Syntax
DBMS_MGWADM.REMOVE_MSGSYSTEM_LINK( linkname IN VARCHAR2);
Parameters
Table 105-40 REMOVE_MSGSYSTEM_LINK Procedure Parameters
Parameters | Description |
---|---|
|
The messaging system link name |
Usage Notes
All registered queues associated with this link must be removed before the messaging system link can be removed. This procedure fails if there is a registered foreign (non-Oracle) queue that references this link.
105.5.22 REMOVE_OPTION Procedure
This procedure removes a Messaging Gateway configuration option. It can be used to remove an agent option, a messaging link option, or a propagation job option.
Syntax
DBMS_MGWADM.REMOVE_OPTION ( target_type IN PLS_INTEGER, target_name IN VARCHAR2, option_name IN VARCHAR2);
Parameters
Table 105-41 REMOVE_OPTION Procedure Parameters
Parameter | Description |
---|---|
|
Specifies the target type of the Messaging Gateway entity:
|
|
Name or identifier of the target. The value for this parameter depends on the value specified for |
option_name |
Option name. This must not be |
See Also:
Table 105-10 regarding options for the option_type
parameter
Usage Notes
DBMS_MGWADM.AGENT_JAVA_PROP Target
The procedure removes an agent option used to set a Java System property when the Messaging Gateway agent is started. The agent must be restarted for the change to take effect.
The parameters are interpreted as follows:
-
target_name
specifies the name of the Messaging Gateway agent.DBMS_MGWADM
.DEFAULT_AGENT
can be used for the default agent. -
option_name
specifies the Java System property -
encrypted
can be eitherTRUE
orFALSE
DBMS_MGWADM.MSGLINK_OPTION Target
The procedure removes a single option for a Messaging Gateway messaging system link. This is equivalent to calling DBMS_MGWADM
.ALTER_MSGSYSTEM_LINK
and using the options parameter to remove an option.
The parameters are interpreted as follows:
-
target_name
specifies the name of the message system link -
option_name
specifies the option to set -
encrypted
must beFALSE
DBMS_MGWADM.JOB_OPTION Target
The procedure removes a single option for a Messaging Gateway propagation job. This is equivalent to calling DBMS_MGWADM
.ALTER_JOB
and using the options parameter to remove an option.
The parameters are interpreted as follows:
-
target_name
specifies the name of the propagation job -
option_name
specifies the option to set -
encrypted
must beFALSE
105.5.23 REMOVE_SUBSCRIBER Procedure
This procedure removes a subscriber used to consume messages from a source queue for propagation to a destination.
Note:
This subprogram has been deprecated as a result of improved technology (see REMOVE_JOB Procedure), and is retained only for reasons of backward compatibility.
Syntax
DBMS_MGWADM.REMOVE_SUBSCRIBER ( subscriber_id IN VARCHAR2, force IN BINARY_INTEGER DEFAULT DBMS_MGWADM.NO_FORCE );
Parameters
Table 105-42 REMOVE_SUBSCRIBER Procedure Parameters
Parameter | Description |
---|---|
|
Identifies the subscriber to be removed |
|
Specifies whether this procedure should succeed even if Messaging Gateway is not able to perform all cleanup actions pertaining to this subscriber. Values:
|
Usage Notes
-
The Messaging Gateway agent uses various resources of Oracle Database and the non-Oracle messaging system for its propagation work. These resources are typically associated with each subscriber and need to be released when the subscriber is no longer needed. Therefore, this procedure should only be called when the Messaging Gateway agent is running and able to access the non-Oracle messaging system associated with this subscriber.
-
For outbound propagation, a local subscriber is removed from the Oracle Database Advanced Queuing queue.
105.5.24 RESET_JOB Procedure
This procedure resets the propagation error state for a propagation job.
Syntax
DBMS_MGWADM.RESET_JOB ( job_name IN VARCHAR2);
Parameters
Table 105-43 RESET_JOB Procedure Parameters
Parameter | Description |
---|---|
|
Identifies the propagation job |
Usage Notes
This procedure can be used to reset a propagation job that has been set to a failed state and propagation activities have been stopped. The administrator should correct the problem and then call this procedure to allow the agent to retry the propagation job. The STATUS
field of the MGW_JOBS
view indicates the job status.
105.5.25 RESET_SUBSCRIBER Procedure
This procedure resets the propagation error state for a subscriber.
Note:
This subprogram has been deprecated as a result of improved technology (see RESET_JOB Procedure), and is retained only for reasons of backward compatibility.
Syntax
DBMS_MGWADM.RESET_SUBSCRIBER ( subscriber_id IN VARCHAR2 );
Parameters
Table 105-44 RESET_SUBSCRIBER Procedure Parameters
Parameter | Description |
---|---|
|
Identifies the subscriber |
105.5.26 SCHEDULE_PROPAGATION Procedure
This procedure schedules message propagation from a source to a destination.
The schedule must be enabled and Messaging Gateway started in order for messages to be propagated.
Note:
This subprogram has been deprecated as a result of improved technology (see CREATE_JOB Procedure), and is retained only for reasons of backward compatibility.
Syntax
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 NULL);
Parameters
Table 105-45 SCHEDULE_PROPAGATION Procedure Parameters
Parameter | Description |
---|---|
|
Specifies a user-defined name that identifies the schedule |
|
Specifies the type of message propagation. |
|
Specifies the source queue whose messages are to be propagated. The syntax and interpretation of this parameter depend on the value specified for |
|
Specifies the destination queue to which messages are propagated. The syntax and interpretation of this parameter depend on the value specified for |
|
Reserved for future use |
|
Reserved for future use |
|
Reserved for future use |
|
Specifies the polling interval, in seconds, used by the Messaging Gateway agent when checking for messages in the source queue. If no messages are available in the source queue, then the agent will not poll again until the polling interval has passed. Once the agent detects a message it will continue propagating messages as long as any are available. Values: |
Usage Notes
For outbound propagation, parameters are interpreted as follows:
-
source
specifies the local Oracle Database Advanced Queuing queue from which messages are propagated. This must have a syntax ofschema.queue
. -
destination
specifies the foreign queue to which messages are propagated. This must have a syntax ofregistered_queue@message_link
.
For inbound propagation, parameters are interpreted as follows:
-
source
specifies the foreign queue from which messages are propagated. This must have a syntax ofregistered_queue@message_link
. -
destination
specifies the local Oracle Database Advanced Queuing queue to which messages are propagated. This must have a syntax ofschema.queue
.
The schedule is set to an enabled state when it is created.
105.5.27 SET_LOG_LEVEL Procedures
This procedure dynamically alters the Messaging Gateway agent logging level. The Messaging Gateway agent must be running.
Syntax
DBMS_MGWADM.SET_LOG_LEVEL ( log_level IN BINARY_INTEGER);
DBMS_MGWADM.SET_LOG_LEVEL ( agent_name IN VARCHAR2, log_level IN BINARY_INTEGER);
Parameters
Table 105-46 SET_LOG_LEVEL Procedure Parameters
Parameter | Description |
---|---|
|
Level at which the Messaging Gateway agent logs information. |
|
Identifies the Messaging Gateway agent. |
See Also:
Table 105-3 for details on the log_level
parameter
105.5.28 SET_OPTION Procedure
This procedure sets a Messaging Gateway configuration option. It can be used to set an agent option, a messaging link option, or a propagation job option.
Syntax
DBMS_MGWADM.SET_OPTION ( target_type IN PLS_INTEGER, target_name IN VARCHAR2, option_name IN VARCHAR2, option_value IN VARCHAR2, encrypted IN BOOLEAN DEFAULT FALSE );
Parameters
Table 105-47 SET_OPTION Procedure Parameters
Parameter | Description |
---|---|
|
Specifies the target type of the Messaging Gateway entity:
|
|
Name or identifier of the target. The value for this parameter depends on the value specified for |
option_name |
Option name. This must not be |
|
Option value |
|
Indicates whether the value should be stored as encrypted:
|
See Also:
Table 105-10 regarding options for the option_type
parameter
Usage Notes
DBMS_MGWADM.AGENT_JAVA_PROP Target
The procedure will store an agent option used to set a Java System property when the Messaging Gateway agent is started. The agent must be restarted for the change to take effect.
The parameters are interpreted as follows:
-
target_name
specifies the name of the Messaging Gateway agent.DBMS_MGWADM
.DEFAULT_AGENT
can be used for the default agent. -
option_name
specifies the Java System property -
encrypted
can be eitherTRUE
orFALSE
DBMS_MGWADM.MSGLINK_OPTION Target
The procedure will set or alter a single option for a Messaging Gateway messaging system link. This is equivalent to calling DBMS_MGWADM
.ALTER_MSGSYSTEM_LINK
and using the options parameter to set an option.
The parameters are interpreted as follows:
-
target_name
specifies the name of the message system link -
option_name
specifies the option to set -
encrypted
must beFALSE
DBMS_MGWADM.JOB_OPTION Target
The procedure will set or alter a single option for a Messaging Gateway propagation job. This is equivalent to calling DBMS_MGWADM
.ALTER_JOB
and using the options parameter to set an option.
The parameters are interpreted as follows:
-
target_name
specifies the name of the propagation job -
option_name
specifies the option to set -
encrypted
must beFALSE
105.5.29 SHUTDOWN Procedures
This procedure shuts down the Messaging Gateway agent. No propagation activity occurs until Messaging Gateway is restarted.
Syntax
DBMS_MGWADM.SHUTDOWN ( sdmode IN BINARY_INTEGER DEFAULT DBMS_MGWADM.SHUTDOWN_NORMAL);
DBMS_MGWADM.SHUTDOWN ( agent_name IN VARCHAR2);
Parameters
Table 105-48 SHUTDOWN Procedure Parameters
Parameter | Description |
---|---|
|
The shutdown mode. The only value currently supported is |
|
Identifies the Messaging Gateway agent. |
Usage Notes
The Messaging Gateway default agent is shut down if no agent name is specified.
105.5.30 STARTUP Procedures
This procedure starts the Messaging Gateway agent. It must be called before any propagation activity can take place.
Syntax
DBMS_MGWADM.STARTUP( instance IN BINARY_INTEGER DEFAULT 0, force IN BINARY_INTEGER DEFAULT DBMS_MGWADM.NO_FORCE);
DBMS_MGWADM.STARTUP( agent_name IN VARCHAR2);
Parameters
Table 105-49 STARTUP Procedure Parameters
Parameter | Description |
---|---|
|
Specifies which instance can run the job queue job used to start the Messaging Gateway agent. If this is zero, then the job can be run by any instance. Caution: This parameter has been deprecated. |
|
If this is Caution: This parameter has been deprecated. |
|
Identifies the Messaging Gateway agent. |
Usage Notes
-
The Messaging Gateway default agent will be started if an agent name is not specified.
-
The
force
andinstance
parameters are no longer used and will be ignored. If theinstance
affinity parameters were being used to start the default agent on a specific instance, the administrator will need to create a database service and then assign that service to the default agent using theDBMS_MGWADM
.ALTER_AGENT
procedure. -
The Messaging Gateway agent cannot be started until an agent user has been configured by the
DBMS_MGWADM
.CREATE_AGENT
orDBMS_MGWADM
.ALTER_AGENT
subprograms.
105.5.31 UNREGISTER_FOREIGN_QUEUE Procedure
This procedure removes a non-Oracle queue entity in Messaging Gateway.
Syntax
DBMS_MGWADM.UNREGISTER_FOREIGN_QUEUE( name IN VARCHAR2, linkname IN VARCHAR2);
Parameters
Table 105-50 UNREGISTER_FOREIGN_QUEUE Procedure Parameters
Parameter | Description |
---|---|
|
The queue name |
|
The link name for the messaging system on which the queue exists |
Usage Notes
-
This procedure does not remove the physical queue in the non-Oracle messaging system.
-
All propagation jobs, subscribers and schedules referencing this queue must be removed before it can be unregistered. This procedure fails if a propagation job, subscriber, or propagation schedule references the non-Oracle queue.
105.5.32 UNSCHEDULE_PROPAGATION Procedure
This deprecated procedure removes a propagation schedule.
Note:
This subprogram has been deprecated as a result of improved technology (see REMOVE_JOB Procedure), and is retained only for reasons of backward compatibility.
Syntax
DBMS_MGWADM.UNSCHEDULE_PROPAGATION ( schedule_id IN VARCHAR2 );
Parameters
Table 105-51 UNSCHEDULE_PROPAGATION Procedure Parameters
Parameter | Description |
---|---|
|
Identifies the propagation schedule to be removed |