Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 5

SQL * Loader Concurrent Program

Populate records from a flat file into a custom table using SQL * Loader.
Develop the SQL * Loader Program as per the below mentioned requirement:

1. The Custom Table should reside in Custom Schema and its corresponding Synonym should
reside in APPS Schema.

2. The Custom Table should have FND Standard WHO Columns.

3. The SQL * Loader should be registered as a Concurrent Program.

Solution:

1. Design the Custom Table as per the below structure.


CREATE TABLE cus.xxcustom_emp_nv
(emp_id NUMBER,
ename VARCHAR2(100),
job VARCHAR2(70),
email VARCHAR2(100),
created_by NUMBER,
creation_date DATE,
last_update_date DATE,
last_updated_by NUMBER,
last_update_login NUMBER)
/

CREATE SYNONYM xxcustom_emp_nv FOR cus.xxcustom_emp_nv


/

2. Define the Flat File Structure and Control File Structure.

Flat File Structure


Krishna,Consultant,jerry@gmail.com,
Rahul,Senior Manager,jack@yahoo.com,
Sekar,Senior Consultant,j2123@gmail.com,

Control File Structure


LOAD DATA
INFILE '$CUST_TOP/bin/XXCUSTOM_EMP_NV.txt'
REPLACE INTO TABLE xxcustom_emp_nv
FIELDS TERMINATED BY ','
TRAILING NULLCOLS
(emp_id SEQUENCE(MAX,1),
ename,job,email,
created_by "FND_GLOBAL.USER_ID",
creation_date SYSDATE,last_update_date SYSDATE,
last_updated_by "FND_GLOBAL.USER_ID",
last_update_login "FND_GLOBAL.LOGIN_ID")
3. Copy the Control File and Flat File to $CUST_TOP/bin directory in EBS Server.

4. Define a Concurrent Executable of Execution Method - SQL * Loader in System Administrator


Responsibility.
5. Define a Concurrent Program and attach the Concurrent Executable to the Concurrent
Program.

6. Attach the Concurrent Program to the Responsibility’s Request Group.

7. Run the Concurrent Program from the SRS Form.


8. Run the SQL query to retrieve the records loaded into the Custom Table.

SELECT * FROM xxcustom_emp_nv

You might also like