You are on page 1of 12

NEWEST ARTICLES

o o o o o
Data Services Flatfiles Tips Working with Data Services Flatfiles Implementing Rapidly changing dimension Why do we need Staging Area during ETL Load Performance Considerations for Dimensional Modeling

JOIN THE COMMUNITY

ALSO READ
o o o o o o o
Implementing Informatica Partitions Using Informatica Normalizer Transformation Aggregation with out Informatica Aggregator Informatica Dynamic Lookup Cache All about Informatica Lookup Informatica Performance Tuning - Complete Guide Implementing Informatica Persistent Cache

FREE BI DIGEST

Your Name? Your Email?

Subscribe Now !

0 2,1

sub formAcymailing1

notask

http%3A%2F%2F http%3A%2F%2F com_acymailing

NEED MORE HELP ON THIS SUBJECT?


Ask a question

Useful Informatica Metadata Repository Queries


Last Updated on Sunday, 15 July 2012 18:06 Written by DWBIConcepts Team

Informatica metadata repository stores and maintains information about all the objects in Informatica. They contain details of connection information, users, folders, mappings, sources, targets etc. These information can serve many purposes while accessed through external SQL query.

Search for Truncate Table Option


Suppose you want to find out on which of your sessions, truncate target table option is set on. Instead of manually opening each task and checking if the truncate table option is on, you may use the below query: select task_name, 'Truncate Target Table' ATTR, decode(attr_value,1,'Yes','No') Value from OPB_EXTN_ATTR OEA, REP_ALL_TASKS RAT where OEA.SESSION_ID=rat.TASK_ID and attr_id=9

Find Mappings where SQL Override is used


Below query will give you count of mapping instance where SQL Override has been used. The count is presented folder by folder.

WITH detail AS (SELECT c.subject_area, c.mapping_name, d.instance_name source_qualifier_name, CASE WHEN a.attr_value IS NOT NULL THEN 1 ELSE 0 END as OVR_OK FROM rep_all_mappings c, opb_widget_inst d, opb_widget_attr a WHERE c.mapping_id = d.mapping_id AND c.mapping_version_number = d.version_number AND d.widget_type = 3 AND d.widget_id = a.widget_id AND a.widget_type = d.widget_type AND a.attr_id = 1 ) SELECT subject_area, 'SQ_OVERIDE' STATUS, COUNT (DISTINCT mapping_name) NO_OF_Mapping, COUNT (DISTINCT (mapping_name || source_qualifier_name)) NO_OF_SQ_IN_MAPPING, COUNT (DISTINCT (source_qualifier_name)) NO_OF_DISTINCT_SQ FROM detail WHERE OVR_OK =1 GROUP BY subject_area UNION SELECT subject_area, 'SQ_NON_OVERIDE', COUNT (DISTINCT mapping_name) nb_mapping, COUNT (DISTINCT (mapping_name || source_qualifier_name)) nb_map_inst, COUNT (DISTINCT (source_qualifier_name)) nb_inst FROM detail WHERE OVR_OK =0

GROUP BY subject_area

Find Tracing Levels for Informatica Sessions


Sessions can have different tracing levels (Terse to Verbose). Often in Development environment we test our mappings with verbose tracing levels and then forget to reduce the level while promoting to Production environments. This creates issues like abnormal "SessLogs" growth, slower mapping performance etc. This query will give tracing information along with session names so that you can quickly identify unintended tracing levels without opening each sessions manually. select task_name, decode (attr_value, 0,'None', 1,'Terse', 2,'Normal', 3,'Verbose Initialisation', 4,'Verbose Data','') Tracing_Level from REP_SESS_CONFIG_PARM CFG, opb_task TSK WHERE CFG.SESSION_ID=TSK.TASK_ID and tsk.TASK_TYPE=68 and attr_id=204 and attr_type=6

Find name of all stored procedure used in stored procedure transformation


This query is helpful when you require to know name of all stored procedure being used in informatica stored procedure transformation

select attr_value from OPB_WIDGET_ATTR where widget_type=6 and attr_id=1

Find who modified (saved) a mapping last time


This information is available under mapping properties. But the below query lists down this information for all the mappings in one place. SELECT substr(rpl.event_time,7,4) || substr(rpl.event_time,6,1) || substr(rpl.event_time,1,5) || "EventTimestamp" , usr.user_name "Username", DECODE(rpl.object_type_id,21,s21.subj_name,('('rpl.object_type_id')')) "Folder", obt.object_type_name "Type", DECODE(rpl.object_type_id,21,map.mapping_name,('('rpl.object_type_id')')) "Object" FROM opb_reposit_log rpl, opb_object_type obt, opb_subject fld, opb_mapping map, opb_users usr, opb_subject s21 WHERE obt.object_type_name = 'Mapping' AND rpl.object_type_id = obt.object_type_id AND rpl.object_id = map.mapping_id(+) AND rpl.object_id = fld.subj_id(+) AND rpl.event_uid = usr.user_id AND map.subject_id = s21.subj_id(+) ' ' substr(rpl.event_time,12,11)

ORDER BY 1 DESC

Find Lookup Information from Repository


This query will give information about lookup transformations like lookup name,Tablename ,Mapping name etc. Select distinct wid.WIDGET_ID, all_map.mapping_name, wid.INSTANCE_NAME Lkp_name, Decode(widat.attr_id,2,widat.attr_value) Table_name, decode (widat.attr_id,6,widat.attr_value) src_tgt FROM rep_all_mappings ALL_MAP, rep_widget_inst wid, OPB_WIDGET_ATTR widat where all_map.mapping_id=wid.mapping_id and wid.WIDGET_ID=widat.WIDGET_ID and wid.WIDGET_TYPE=11 and widat.WIDGET_TYPE=11 and widat.ATTR_ID in (2,6)

Find all Invalid workflows from Metadata repository


This query will list of all invalid workflows under the given subject area (folder) select opb_subject.subj_name, opb_task.task_name from opb_task,

opb_subject where task_type = 71 and is_valid = 0 and opb_subject.subj_id = opb_task.subject_id and UPPER(opb_subject.SUBJ_NAME) like UPPER('YOUR_FOLDER_NAME')

Generate a list of failed sessions from the repository


Here is a query that will display list of failed / aborted / terminated sessions from each of the folders in the repository SELECT RSL.SUBJECT_AREA AS FOLDER, RW.WORKFLOW_NAME AS WORKFLOW, RSL.SESSION_NAME AS SESSION_NAME, DECODE(RSL.RUN_STATUS_CODE, 3,'FAILED', 4,'STOPPED', 5,'ABORTED', 15,'TERMINATED','UNKNOWN') AS STATUS, RSL.FIRST_ERROR_CODE AS FIRST_ERROR, RSL.FIRST_ERROR_MSG AS ERROR_MSG, RSL.ACTUAL_START AS START_TIME, RSL.SESSION_TIMESTAMP AS END_TIME FROM REP_SESS_LOG RSL, REP_WORKFLOWS RW WHERE RSL.RUN_STATUS_CODE IN (3,4,5,14,15) AND RW.WORKFLOW_ID = RSL.WORKFLOW_ID AND RW.SUBJECT_ID = RSL.SUBJECT_ID AND RSL.SUBJECT_AREA ='CDW_FDR2_SERVICEQUALITY' ORDER BY RSL.SESSION_TIMESTAMP DESC

Hi all though OPB table are working fine, some how I see all the repository tables do not update , they all returns null for some reason for instance: SQL> select * from REP_ALL_TASKS;. no rows selected.

AVoymyAt

Submit Query

DWBIConcepts That might be because you do not have read access to these views (REP_* are actually views not table) or may be you do not have any valid tasks present in the infa repository. Reply Like
AVoymyAt

Like

Bhasker Bobby Technical Business Analyst at GE Thnk i know wht i m talking, all my tasks,woklets, wfs evering z valid, all the users tht i wrk with hv the dba level access, i knw these r pre built views , some how i see backend physical tables r nt updating let me knw ig u ever experienced i m still working on finding th gap will let u know once i get it

AVoymyAt

Submit Query

Soubhagya Sahoo Silicon Institute of Technology Can anyone please explain where to run these queries, because our INFA servers are on UNIX. So how to run these queries? Reply Like
AVoymyAt

Like

28 April at 10:34
AVoymyAt fbc_1015065469 uzbljfg13 reply http://w w w .dw b http://w w w .dw b light feedback_0kUpO en_GB

AVoymyAt

Submit Query

Debraj Ghosh Does it impact our Repository objects anyhow when we delete any record from the rep tables? Like if today I have a mapping checked out and it is having an entry in OPOB_Mapping table. What will happen if I delete that entry from that table? Reply Like
AVoymyAt

Like

11 March at 00:50

Mark as spam Report as abuse

AVoymyAt

Submit Query

DWBIConcepts That would lead to inconsistent behavior in most cases. While deleting or updating the tables directly, we must remember that the data model in which informatica stores the metadata is actually very complex. There are multiple relationships between entities and individual records are also versioned. If you change one record directly in one table, that may affect the data stored in some other tables because of the entity relations. Hence changing anything directly in the metadata tables is highly risky and not at all recommended. You can only use them for "reading". Reply 1 Like
AVoymyAt

Like

26 April at 06:08
AVoymyAt fbc_1015065469 uzbljfg18 reply http://w w w .dw b http://w w w .dw b light feedback_0kUpO en_GB

Add a reply...

Reply

Reply using...

Facebook Yahoo AOL Hotmail

Reply using...

Submit

Mark as spam Report as abuse

AVoymyAt

Submit Query

Barada Biswal Cvrce Where shall we write these queries, Is there a option in Infa to query and find out or we need to find out the login Info for this database and writea query in SQL PLUS. Reply Like
AVoymyAt

Like

11 March at 03:02

Mark as spam Report as abuse

AVoymyAt

Submit Query

DWBIConcepts You need to write these queries in the metadata database. You may connect there using SQL Plus Reply Like
AVoymyAt

Like

26 April at 06:09
AVoymyAt fbc_1015065469 uzbljfg25 reply http://w w w .dw b http://w w w .dw b light feedback_0kUpO en_GB

Add a reply...

Reply

Reply using...

Facebook Yahoo AOL Hotmail

Reply using...

Submit

Mark as spam Report as abuse

AVoymyAt

Submit Query

Debraj Ghosh Is there any way we can find what are all Workflows Scheduled for todaya nd what are Unscheduled manually? Reply Like
AVoymyAt

Like

11 March at 00:45

You might also like