Oracle Apps Techo-Functional

Saturday, 29 June 2013

Run the SQL*loader Based on Concurrent program


SQL * Loader Program - Sample Example

Create the sample concurrent program for running SQL*Loader in Oracle Application
Step 1:
Create the Sql loader control file (.ctl) and data file placed on the server under the path in bin directory (Example: $Custom_top/bin/ )

Step 2:
Create the Control file (.ctl): Demo_test.ctl

Load data
Infile 'D:\Sql_loader\export_dat.dat'
into table demo_test
fields terminated by ','
OPTIONALLY ENCLOSED BY '"'
(
 INDENT_NUMBER,
 CHASSIS,
 ENGINE,
 ITEM
 )

Step 3:
Create the Dat file  (.dat) : export_dat.dat




Step:4
Create Table or copy the structure another Table
Create table demo_test (INDENT_NUMBER      VARCHAR2(20)
CHASSIS            VARCHAR2(100)
ENGINE             VARCHAR2(100)
ITEM               VARCHAR2(100)  );

Copy the Structure of the another  table

Create table demo_test as Select * from XX_table;

Step:5

Creating the concurrent Program 
Application Developer -> Concurrent -> Executables.
Define a concurrent program executable name and choose the execution method is “SQL*loader”  and give the execution file name (name must be same as control file name ). Save it


 
Step:6

Create the Concurrent program name

Step:7

Goto Parameter Window. Create the parameter to take server path of the data file. Define the Server path on Default value


Step :8

Assign the concurrent program under your custom responsibility through a Request Group


Step:9

Run Program under the Custom Responsibility

After the running the concurrent program ,click “view Log”

+---------------------------------------------------------------------------+
XXTC Custom: Version : UNKNOWN

Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.

XXTEST_SQLLDR module: XX_Test_Sqlloader_Demo
+---------------------------------------------------------------------------+

Current system time is 29-JUN-2013 13:22:05

+---------------------------------------------------------------------------+


+-----------------------------
| Starting concurrent program execution...
+-----------------------------

Arguments
------------
/u01/applebsuat/applcrp2/apps/apps_st/appl/xxtc/12.0.0/bin/export_dat.dat
------------

SQL*Loader: Release 10.1.0.5.0 - Production on Sat Jun 29 13:22:05 2013


Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array:     64 rows, maximum of 256000 bytes
Continuation:    none specified
Path used:      Conventional

Table DEMO_TEST, loaded from every logical record.
Insert option in effect for this table: INSERT

   Column Name                  Position   Len  Term Encl Datatype
------------------------------ ---------- ----- ---- ---- ---------------------
INDENT_NUMBER                       FIRST     *   ,  O(") CHARACTER           
CHASSIS                              NEXT     *   ,  O(") CHARACTER           
ENGINE                               NEXT     *   ,  O(") CHARACTER           
ITEM                                 NEXT     *   ,  O(") CHARACTER           


Table DEMO_TEST:
  238 Rows successfully loaded.
  0 Rows not loaded due to data errors.
  0 Rows not loaded because all WHEN clauses were failed.
  0 Rows not loaded because all fields were null.


Space allocated for bind array:                  66048 bytes(64 rows)
Read   buffer bytes: 1048576


Step:10

Check  the back-end Sql developer, whether table got updated or not

    Select * from demo_test;

 


No comments:

Post a Comment