10
How I successfully designed, Implemented and Monitored IBM INFOSPHERE EVENT PUBLISHER : My Experience 05/11/2022 DB2's GOT TALENT FINALS #2 BY Renu Sharma ACE DBA CONSULTING Inc 1

Event Publishing Presentation

Embed Size (px)

DESCRIPTION

How to set up event publishing

Citation preview

Page 1: Event Publishing Presentation

How I successfully designed,

Implemented and Monitored

IBM INFOSPHERE EVENT PUBLISHER

: My Experience 04/13/2023 DB2's GOT TALENT FINALS #2 BY Renu Sharma ACE DBA CONSULTING Inc 1

Page 2: Event Publishing Presentation

2

Requirement

04/13/2023DB2's GOT TALENT FINALS #2 BY Renu Sharma ACE DBA CONSULTING Inc

Asked by e-commerce client to write input feed for Netezza data warehouseData feed should land at staging server • Delimited format as Column delimiter | (pipe)• Character delimiter ‘`’ (acute) Decided to

use Event Publisher After Looking at source, Target and OS

What is Event Publishing ?• It is a subset of Q Replication• Its target is not a table • It has not got Q Apply • Q Capture puts the messages Into MQ websphere Queues• The data messages are written in either XML or CSV

format• It can publish subset of columns and rows• Application program reads destructively/non-

destructively the message Queues

Page 3: Event Publishing Presentation

Event Publication Process

04/13/2023 DB2's GOT TALENT FINALS #2 BY Renu Sharma ACE DBA CONSULTING Inc 3

SourceTab1, Tab2

DB2 Log

Q Capture

Meta DATA

SOURCE

Replication CenterReplication Monitor

Replication Dashboard

ASNCLP Commands

ADMINISTRATION

MQ MESSAGE BROKER

USER Application

TARGET

WBI Event Broker

DB2 MQ Listener

User Stored Procedure

User Application

Page 4: Event Publishing Presentation

04/13/2023DB2's GOT TALENT FINALS #2 BY Renu Sharma ACE DBA CONSULTING Inc

4

EVENT PUBLISHING SETUP FOR NETEZZA

pdbin006@aixdb313p

Instance "pdbin006" uses "64" bits and DB2 code release

"SQL09072" with level identifier "08030107".

Informational tokens are "DB2 v9.7.0.2", "s100514",

and Fix Pack "2".Product is installed at "/udb/

pdbin006/IBM/db2/V9.7".

MQSERVERQMGR NAME : SQLP0232

RESTART QUEUE: ASN.RESTARTQ

ADMINQ : ASN.ADMINQSENDQ : NETEZZA.PUB.QL01PUBLISHING QUEUE MAP :

XCHREPP_EVP_TO_XCHTEZZA_EVP01

DBNAME : REPPSCHEMA : EVP01

CAPTURE LOG :/install/db2/caplog

Submitted By :Renu Sharma 05/03/2011

MQ CLIENT Name: WebSphere MQ

Version: 6.0.2.10CMVC level: p600-210-100825

BuildType: IKAP - (Production)

Page 5: Event Publishing Presentation

04/13/2023DB2's GOT TALENT FINALS #2 BY Renu Sharma ACE DBA CONSULTING Inc 5

Setting up Event Publisher Components

Installing InfoSphere Data Event Publisher using ./ISEPSETUP Register license key of InfoSphere Data Event Publisher db2licm –a isep.licGet QMGR and MQ Objects created by MQ Administrator

QMGR NAME : SQLP0232RESTART QUEUE: ASN.RESTARTQADMINQ : ASN.ADMINQSENDQ : NETEZZA.PUB.QL01

Setup following MQ environment Variables on AIX OS:export ASNUSEMQCLIENT=TRUEexport MQCHLLIB=/var/mqmexport MQCHLTAB=AMQCLCHL.TAB

Page 6: Event Publishing Presentation

Create Control Tables

ASNCLP SESSION SET TO Q REPLICATION;SET SERVER CAPTURE TO REPP DB REPP ID evpbusr1 password "password";SET QMANAGER "SQLP0232" FOR CAPTURE SCHEMA;SET CAPTURE SCHEMA SOURCE EVP01;SET OUTPUT CAPTURE SCRIPT "epcontrol.sql";SET RUN SCRIPT LATER;CREATE CONTROL TABLES FOR CAPTURE SERVER USINGRESTARTQ "ASN.RESTARTQ" ADMINQ "ASN.ADMINQ"SLEEP INTERVAL 1000;QUIT;

asnclp –f asnevpcntrl.qrpdb2 –tvf epcontrol.sql

04/13/2023 DB2's GOT TALENT FINALS #2 BY Renu Sharma ACE DBA CONSULTING Inc 6

Page 7: Event Publishing Presentation

Create Publishing Q MAPSET LOG "pqmap.err";SET SERVER CAPTURE TO DB REPP ;SET CAPTURE SCHEMA SOURCE EVP01;SET OUTPUT CAPTURE SCRIPT "pqmap01.sql";SET QMANAGER "SQLP0232" FOR CAPTURE SCHEMA; SET RUN SCRIPT LATER;CREATE PUBQMAP XCHREPP_EVP_TO_XCHTEEZA_EVP01 USINGSENDQ "NETEZZA.PUB.QL01" MESSAGE FORMAT DELIMITEDMESSAGE CONTENT TYPE TMAX MESSAGE SIZE 128;asnclp –f epqmap.qrpdb2 –tvf pqmap01.sqlTo setup LOAD feed format: db2 "update evp01.IBMQREP_SENDQUEUES set COLUMN_DELIMITER = '|'"db2 "update evp01.IBMQREP_SENDQUEUES set DECIMAL_POINT = ‘.'“db2 "update evp01.IBMQREP_SENDQUEUES set STRING_DELIMITER = ‘`’"

04/13/2023 DB2's GOT TALENT FINALS #2 BY Renu Sharma ACE DBA CONSULTING Inc 7

Page 8: Event Publishing Presentation

Create PublicationASNCLP SESSION SET TO Q REPLICATION;SET LOG "pub.err";SET SERVER CAPTURE TO DB REPP ID DB2ADMIN password “XXX”;SET CAPTURE SCHEMA SOURCE EP1; SET OUTPUT CAPTURE SCRIPT "pub.sql";SET RUN SCRIPT LATER;CREATE PUB USING PUBQMAP XCHREPP_EVP_TO_XCHTEZZA_EVP01(PUBNAME "DEPARTMENT0001" DB2ADMIN.DEPARTMENT ALL CHANGED ROWS Y SUPPRESS DELETES Y);QUIT;asnclp –f asnpublication.qrpdb2 –tvf pub.sqlasnqcap capture_server=REPP capture_schema=EVP01 capture_path=/install/db2/caplog startmode=coldView the messages using :asnqmfmt NETEZZA.PUB.QL0 SQLP0232Data was written at staging server using a JAVA CODE

04/13/2023 DB2's GOT TALENT FINALS #2 BY Renu Sharma ACE DBA CONSULTING Inc 8

Page 9: Event Publishing Presentation

9

Some monitoring SQL’s To Know

04/13/2023 DB2's GOT TALENT FINALS #2 BY Renu Sharma ACE DBA CONSULTING Inc

Querying the Status of Q Captureasnqccmd capture_server = SQLP0232 status show detailsStarting and Stopping the Publication :INSERT INTO EVP01.ibmqrep_signal (signal_type,signal_subtype, signal_input_in, signal_state ) VALUES ( 'CMD','CAPSTART', 'DEPARTMENT0001','P');INSERT INTO EVP01.ibmqrep_signal (signal_type,signal_subtype, signal_input_in, signal_state ) VALUES ( 'CMD','CAPSTOP', 'DEPARTMENT0001', 'P');Status of sendq:SELECT sendq,state FROM EVP01.ibmqrep_sendqueues;Status of restartq:SELECT SUBSTR(qmgr,1,10) AS qmgr, SUBSTR(restartq,1,20) AS restartq FROM EVP01.ibmqrep_capparms ; Status of Q subscription:SELECT SUBSTR(subname,1,10) AS subname,state AS s, state_time FROM EVP01.ibmqrep_subs;

Page 10: Event Publishing Presentation

04/13/2023 DB2's GOT TALENT FINALS #2 BY Renu Sharma ACE DBA CONSULTING Inc 10

Links and resources Please Vote For me

InfoSphere Replication Server and InfoSphere Data Event Publisher Version 9.7 product documentation in PDF formathttp://www-01.ibm.com/support/docview.wss?uid=swg27016356

My contact and blog info : Renu SharmaACE DBA Consulting [email protected], [email protected], 732-995-9963,732-374-3601Facebook :https://www.facebook.com/home.php#!/pages/ACE-DBA-Consulting/138802816289257Twitter : @db2_dbasLinkedin : http://www.linkedin.com/home?trk=hb_tab_home_top