Thursday, May 27, 2010

What my Mapping is currently doing ?

Step 1:- Execute the below query to find out which Mapping is executing:-

select
exe.execution_audit_id,
tar.NUMBER_RECORDS_INSERTED,
step_tar.TARGET_NAME,
tar.STEP_TYPE,
tar.NUMBER_RECORDS_MERGED ,
tar.NUMBER_RECORDS_UPDATED ,exe.execution_audit_id, tar.ELAPSE_TIME,exe.EXECUTION_NAME,exe.EXECUTION_AUDIT_STATUS,map_run.MAP_NAME
from ALL_RT_AUDIT_MAP_RUNS Map_run,ALL_RT_AUDIT_EXECUTIONS Exe, ALL_RT_AUDIT_STEP_RUNS tar, ALL_RT_AUDIT_STEP_RUN_TARGETS step_tar
where exe.EXECUTION_AUDIT_ID=map_run.EXECUTION_AUDIT_ID(+) AND
map_run.map_run_id=tar.map_run_id(+) AND
step_tar.STEP_ID=tar.STEP_ID and
exe.execution_audit_id > '114305' order by exe.execution_audit_id desc


Note the Execution audit id of the Map which is currently running
In My case it is 114358.















Note :- Here the '114305' is the id which we got from OWB control center.



Step 2:-Connect to Database using user having privilege on V$ tables
Execute the below query :-
select * from v$active_session_history where module like '%114358%'














Step 3:-
Check for the column EVENT .
This would tell you what the Mapping is currently doing
SQL*Net more data from dblink :- extracting data from Database link

Load the data form Oracle DB to File

Test is tested on OWB 10.2.0.4

1.Create the Location of file where it need to store. (on server where OWB Server is installed)
1.1 Go to Connection Explorer->File ->new
1.2 Create the location of file say FILE_LOC and path E:\owb_files


2.Create the File Module:-

2.1 Right click on the Files tab under your Project -> New
2.2 Select the location created in step 1.2
2.3 Finish

3.Create the mapping say( MAP_load_to_file)
3.1 Drag the target table to canvas.
3.2 Drag the flat file operator in canvas.
3.3 Then create unbound operator with no attribute.(Test1)
3.4 Select the INOUTGRP1 from Table(source) and drop it into INOUTGRP1 of file Test1
3.5 Right click Test1 Operator and "Create and bind"-> Create in -> select the file location created into step 2. then Ok
3.6 Right click Test1 Operator ->Synchronize ->Outbound ->OK
3.7 Close the map

4.Configure the Map:-
4.1 Right click the map ( Created Step 3. in MAP_load_to_file)
4.2 Click on Flat file Operator -> file name
4.3 On right side "Access Specification "
Fill the details :- Target Data File Location = created in Step1 (FILE_LOC)
Target Data file Name :-Give any name with extension like ( target_file.txt)
4.4 Ok

5.Open the map and validate .

6. Deploy and execute.

Sunday, May 16, 2010

DML Error Tables

Today we are going to explore the DML Error Logging using OWB11R2.

1.Already created module and location with SCOTT user.

2. Will try to insert the records into DEPT table having primary key on DEPTNO.


3.Mapping will look like this :- Dept1 -> Dept






4.Check the data in DEPT table from Sqldeveloper. 8 rows










5.Check the data in DEPT1 table from Sqldeveloper . 12 row

all are 12 rows are already present into target table (DEPT)











6.Configure the mapping to Handle DML Error Table as DEPT_ERR.







7.After mapping execution the all the 12 records are there in DEPT_ERR table and

Mapping run successfully.