Informatica Powercenter Repository : Find which session instances use a certain connection

If you want to check if a relational connection is still used in any session instance you can use the following query on the repository:

SELECT M.MAPPING_NAME
,SI.INSTANCE_NAME INSTANCE_NAME
,SA.ATTR_VALUE TABLE_OWNER
,MSE.OBJECT_NAME READER_WRITER_TYPE
,C.OBJECT_NAME CONNECTION_NAME
,C.USER_NAME
,WA.ATTR_VALUE SQL_OVERRIDE
FROM DWHREP.OPB_SWIDGET_INST SI
,DWHREP.OPB_SWIDGET_ATTR SA
,DWHREP.OPB_MAPPING M
,DWHREP.OPB_WIDGET_INST WI
,DWHREP.OPB_WIDGET_ATTR WA
,DWHREP.OPB_SESS_EXTNS SE
,DWHREP.OPB_MMD_SESS_EXTNS MSE
,DWHREP.OPB_SESS_CNX_REFS SCR
,DWHREP.OPB_CNX C
,DWHREP.OPB_TASK T
WHERE M.MAPPING_ID = WI.MAPPING_ID
AND M.VERSION_NUMBER = WI.VERSION_NUMBER
AND WI.WIDGET_ID = WA.WIDGET_ID
AND WI.REF_VERSION_NUMBER = WA.VERSION_NUMBER(+)
AND WA.ATTR_ID(+) = 1 — SQL Override
AND WA.WIDGET_TYPE(+) = 3 — SQ
AND SI.WIDGET_TYPE IN(1 ,2 ,3 ,56 ,45 ,55 ,84)
AND SI.SESSION_ID = SE.SESSION_ID
AND SI.SESSION_ID = SA.SESSION_ID(+)
AND SI.VERSION_NUMBER = SA.VERSION_NUMBER(+)
AND SA.ATTR_ID(+) = 28 — Owner
AND SI.SESS_WIDG_INST_ID = SE.SESS_WIDG_INST_ID
AND SE.OBJECT_TYPE = MSE.OBJECT_TYPE
AND SE.OBJECT_SUBTYPE = MSE.OBJECT_SUBTYPE
AND SE.SESSION_ID = SCR.SESSION_ID
AND SCR.REF_OBJECT_TYPE = C.OBJECT_TYPE
AND SCR.REF_OBJECT_SUBTYP = C.OBJECT_SUBTYPE
AND SCR.REF_OBJECT_ID = C.OBJECT_ID
AND SE.SESS_WIDG_INST_ID = SCR.SESS_WIDG_INST_ID
AND SI.VERSION_NUMBER = SE.VERSION_NUMBER
AND SCR.WORKFLOW_ID = 0
AND SI.VERSION_NUMBER = SCR.VERSION_NUMBER
AND SI.SESSION_ID = T.TASK_ID
AND SI.VERSION_NUMBER = T.VERSION_NUMBER
AND T.IS_VISIBLE = 1
AND SI.MAPPING_ID = M.MAPPING_ID
AND M.VERSION_NUMBER = SI.VERSION_NUMBER
AND C.OBJECT_NAME IN(:CONNECTIONNAME)
UNION ALL
SELECT M.MAPPING_NAME
,SI.INSTANCE_NAME INSTANCE_NAME
,SA.ATTR_VALUE
,MSE.OBJECT_NAME READER_WRITER_TYPE
,SCR.REF_OBJECT_VALUE CONNECTION_NAME
,C.USER_NAME
,WA.ATTR_VALUE SQL_OVERRIDE
FROM DWHREP.OPB_SWIDGET_INST SI
,DWHREP.OPB_SWIDGET_ATTR SA
,DWHREP.OPB_MAPPING M
,DWHREP.OPB_SESS_EXTNS SE
,DWHREP.OPB_MMD_SESS_EXTNS MSE
,DWHREP.OPB_SESS_CNX_REFS SCR
,DWHREP.OPB_TASK T
,DWHREP.OPB_CNX C
,DWHREP.OPB_WIDGET_INST WI
,DWHREP.OPB_WIDGET_ATTR WA
WHERE M.MAPPING_ID = WI.MAPPING_ID
AND M.VERSION_NUMBER = WI.VERSION_NUMBER
AND WI.WIDGET_ID = WA.WIDGET_ID
AND WI.REF_VERSION_NUMBER = WA.VERSION_NUMBER(+)
AND WA.ATTR_ID(+) = 1
AND WA.WIDGET_TYPE(+) = 3
AND SI.WIDGET_TYPE IN(1 ,2 ,3 ,56 ,45 ,55 ,84)
AND SI.SESSION_ID = SE.SESSION_ID
AND SI.SESSION_ID = SA.SESSION_ID(+)
AND SA.ATTR_ID(+) = 28 — Owner
AND SI.VERSION_NUMBER = SA.VERSION_NUMBER(+)
AND SCR.SESSION_ID = SE.SESSION_ID
AND SI.SESS_WIDG_INST_ID = SE.SESS_WIDG_INST_ID
AND SE.OBJECT_TYPE = MSE.OBJECT_TYPE
AND SE.OBJECT_SUBTYPE = MSE.OBJECT_SUBTYPE
AND SCR.REF_OBJECT_ID = 0
AND SE.SESS_WIDG_INST_ID = SCR.SESS_WIDG_INST_ID
AND SI.VERSION_NUMBER = SE.VERSION_NUMBER
AND SCR.WORKFLOW_ID = 0
AND SCR.REF_OBJECT_TYPE = C.OBJECT_TYPE
AND SCR.REF_OBJECT_SUBTYP = C.OBJECT_SUBTYPE
AND SCR.REF_OBJECT_ID = C.OBJECT_ID
AND SI.VERSION_NUMBER = SCR.VERSION_NUMBER
AND SI.SESSION_ID = T.TASK_ID
AND SI.VERSION_NUMBER = T.VERSION_NUMBER
AND SI.MAPPING_ID = M.MAPPING_ID
AND M.VERSION_NUMBER = SI.VERSION_NUMBER
AND T.IS_VISIBLE = 1
AND SCR.REF_OBJECT_VALUE IN(:CONNECTIONNAME) ;

This was checked on PWC 9.1.0 Hotfix2

Leave a Reply

Your email address will not be published.

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close