In "When Button Pressed " Trigger of a button in the form, write the below mentioned code,
DECLARE
usid VARCHAR2 (10) := 'apps';
pwd VARCHAR2 (10) := 'wipl10';
db VARCHAR2 (10) := 'dev';
msqlldr VARCHAR2 (300);
ctrl_filename VARCHAR2 (300)
:=
'/c03/DEV/apps/apps_st/appl/payapps/12.0.0/bin/my_test.ctl';
data_filename VARCHAR2 (300)
:=
'/c03/DEV/apps/apps_st/appl/payapps/12.0.0/bin/my_data.csv';
fname VARCHAR2 (1000);
BEGIN
msqlldr :=
'sqlldr'
|| ' userid='
|| usid
|| '/'
|| pwd
|| '@'
|| db
|| ' control='
|| ctrl_filename
|| ' data='
|| data_filename;
HOST (msqlldr, no_screen);
END;
Usid :- is the user id of the database.
pwd:- is the password of the database
db:- the database sid.
ctrl_filename:- is the control file location along with the control file name in the server
data_filename:- is the control file location along with the control file name in the server
Nice article. Thanks!
ReplyDeleteI like Data Loader a third party tool which is an alternative to SQL Loader, which does not need any commands or programming and supports bulk loads also. One can download it from http://www.dbload.com