HOW TO DO SETUP AQ MQ SCRPITS
How to check Gateway?
select * from mgw_gateway
How to check Schedules?
select * from mgw_schedules
How to check Subscribers?
select * from mgw_subscribers
How to check Foreign Queues?
select * from mgw_foreign_queues
-- How to Check MGW gateway Start or Not
select * from mgw_gateway
-- How To Stop/Shutdown MGWgateway
begin
dbms_mgwadm.shutdown;
end;
-- HowTo Remove UNSCHEDULE PROPAGATION
BEGIN
DBMS_MGWADM.UNSCHEDULE_PROPAGATION(schedule_id => 'CRM_EAI_AQ2MQ_SCH');
END;
-- HowTo Remove SUBSCRIBER
BEGIN
DBMS_MGWADM.REMOVE_SUBSCRIBER (subscriber_id => 'CRM_EAI_AQ2MQ_SUB',
FORCE => 1 );
END;
-- How To Remove / UNREGISTER FOREIGN QUEUE
BEGIN
DBMS_MGWADM.UNREGISTER_FOREIGN_QUEUE (name => 'CRM_EAI_REQ_QUEUE',
linkname => 'CRM_EAI_AQ_MQ_LINK' );
END;
-- How to Add REGISTER FOREIGN QUEUE
DECLARE
v_options SYS.mgw_properties;
BEGIN
v_options := SYS.mgw_properties (SYS.mgw_property ('MQ_openOptions', '2066'));
DBMS_MGWADM.register_foreign_queue(NAME => 'CRM_EAI_REQ_QUEUE', -- MGW foreign queue name
linkname => 'CRM_EAI_AQ_MQ_LINK', -- name of link to use
provider_queue => RTRIM ('ICRM.CMS.WRITEBSCS.02'), -- name of MQSeries queue
domain => DBMS_MGWADM.domain_queue, -- single consumer queue
options => v_options );
END;
--How to Execute following script to check.
select name, link_name, provider_queue from MGW_FOREIGN_QUEUES
where NAME='CRM_EAI_REQ_QUEUE'
--How to Add subscriber
BEGIN
DBMS_MGWADM.add_subscriber
(subscriber_id => 'CRM_EAI_AQ2MQ_SUB', -- MGW subscriber name
propagation_type => DBMS_MGWADM.outbound_propagation,
queue_name => 'AQADMIN.VF_REQUEST_QUE_EAI',
destination => 'CRM_EAI_REQ_QUEUE@CRM_EAI_AQ_MQ_LINK');
END;
--How to Execute following script to check.
select subscriber_id,queue_name,destination,exception_queue from mgw_subscribers
-- where SUBSCRIBER_ID='CRM_EAI_AQ2MQ_SUB'
-- How to Add schedule_propagation
BEGIN
DBMS_MGWADM.schedule_propagation
(schedule_id => 'CRM_EAI_AQ2MQ_SCH',
propagation_type => DBMS_MGWADM.outbound_propagation,
SOURCE => 'AQADMIN.VF_REQUEST_QUE_EAI',
destination => 'CRM_EAI_REQ_QUEUE@CRM_EAI_AQ_MQ_LINK'
);
END;
--How to Execute following script to check.
select schedule_id,source, destination from mgw_schedules
--Now How to Start MGWGateway
begin
dbms_mgwadm.startup;
end;
No comments:
Post a Comment