Sunteți pe pagina 1din 3

INTERFACES:

It is nothing but a program; it will be used to transfer the data from flat file to data
base table or from data base table to flat file. Two types of interfaces given below.

1.Outbound Interface
2.Inbound Interface

Outbound Interface:
it will be used to transfer the data from oracle apps base table to legacy system flat file.
We will develop a concurrent program, which is pl/sql procedure. Inside of that we will
use UTL_FILE package to generate the flat file.

UTL_FILE:
it is one of the pl/sql package, which will be used to transfer the data from oracle data
base table to flat files or from flat files to oracle data base tables. But we will use sql
loader to transfer data from flat file to data base tables

Inbound Interface or Conversion:


it will be used to upload the data from legacy system flat file to oracle apps base table.
For this we will use SQL LOADER program and pl/sql program.

SQL Loader:
This is a CUI(Character User Interface) Tool, which is used to load data from flat files to
tables. We have to feed control file to the SQL Loader this control file contains
information about the flat file and into which table needs to be loaded.

Syntax:
LOAD DATA
INFILE <FILENAME>
[INSERT / REPLACE / TRUNCATE / APPEND]
INTO TABLE <TABLENAME>
FIELDS TERMINATED BY ,
OPTIONALLY ENCLOSED
TRIALING NULLCOLLS
WHERE ---[CONDITION]

Filler Clause: The filler clause is used to skip one column data in the flat file.

As a part of the execution the SQLLDR creates three files according to the output type
those are given below.

1.Bad File:
Which will be created whenever there are records, which are rejected while inserting
into the table from the flat file?
2.Discard File:
It will be created whenever there are records which are not satisfying the filtering criteria
specified in the where clause of the control file.

3.Log File:
This file contains the complete information of data it will be created at all times when
ever we fire SQLLDR.

Types of Interfaces:
There are two types of interfaces.

1.Open Interface.
2.Custom Interface.

Open Interface:
Open interface is nothing but it provides interface tables and import programs to import
data into base tables.

Customer Interface:
Whenever oracle has not provided any import programs or API to import data into base
tables we call it as a custom interface.

Interface Process:
1.Based on the flat file w e will develop the control file and insert the data into staging
table.

Note: Place the control file in the bin directory of your custom application directory.

2.Register that in oracle 11i applications by taking execution method as SQL * LOADER
we develop the packages which will be having procedures like validate the staging
table, moving the validated data to the interface tables, run import program after that
register that package in oracle 11i applications

Note:
While transferring the data into base tables we pass three extra cols those are given below.

Process_flag (Number)
Transaction_type (Varchar2)
Set_process_id

Process_flag:
To check the status of the row which we fetched into the table. We pass different values
that indicate the status of the row those are given below.

1 To be process
2 Import Success
3 Error
4 Validation Under Process
7 Validation Successful.

Transaction_type:
This is used to identify which transaction was done those are
CREATE,
UDATE.

Set_process_id:
It is used to split the no. of records to use memory correctly without getting any SGA
MEMORY error.

Note:
We cant load more than one organization records at a time. First we have to load the master
organization and then child organization.

S-ar putea să vă placă și