Home » Developer & Programmer » Forms » Running Sqlloader in forms10g (Windows server 2003)
icon14.gif  Running Sqlloader in forms10g [message #329299] Tue, 24 June 2008 23:58 Go to next message
sri_81_in
Messages: 12
Registered: June 2008
Junior Member
Hi Everybody,

I need to run sqlloader in forms10g. I am using the HOST command. I am mapping the path of the Application server in the forms for taking the control file/DAT file and also SQLLDR.exe.
The form is not displaying any error message and also the records are not getting inserted. Please find attached the code below. Kindly look in to this and help me out.

declare
usid varchar2(10):= get_application_property(username);
pwd varchar2(10):= get_application_property(password);
db varchar2(10):= get_application_property(connect_string);
msqlldr varchar2(300);
ctrl_filename varchar2(300) := 'D:\oracle\product\10.2.0\db_1\BIN\INS.CTL';---This is the path of the application server
data_filename varchar2(300) := 'D:\oracle\product\10.2.0\db_1\BIN\abc.dat';
fname varchar2(1000);

begin
msqlldr := 'D:\oracle\product\10.2.0\db_1\BIN\sqlldr.exe'||
' userid='||usid||'/'||pwd||'@'||db||
' control='||ctrl_filename||
' data='||data_filename||
' bad=D:\oracle\product\bad01'||
' log=D:\oracle\product\log01.log';

host(msqlldr,no_screen);
Re: Running Sqlloader in forms10g [message #329304 is a reply to message #329299] Wed, 25 June 2008 00:17 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
How about removing the no_screen for starters?
Re: Running Sqlloader in forms10g [message #329336 is a reply to message #329304] Wed, 25 June 2008 02:44 Go to previous messageGo to next message
sri_81_in
Messages: 12
Registered: June 2008
Junior Member
Hi,

I have removed the no_screen option also. Still the problem exists.
Re: Running Sqlloader in forms10g [message #329344 is a reply to message #329336] Wed, 25 June 2008 02:58 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
but do you see anything now?
Re: Running Sqlloader in forms10g [message #329351 is a reply to message #329344] Wed, 25 June 2008 03:14 Go to previous messageGo to next message
sri_81_in
Messages: 12
Registered: June 2008
Junior Member
hi,

No screen is coming..meaning the command prompt dialog box.
Re: Running Sqlloader in forms10g [message #329356 is a reply to message #329351] Wed, 25 June 2008 03:23 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
And then? Does it disappear? Does it stay?
Please describe exactly what you see.
Remember, we cannot see your screen.
Re: Running Sqlloader in forms10g [message #329362 is a reply to message #329356] Wed, 25 June 2008 03:37 Go to previous messageGo to next message
sri_81_in
Messages: 12
Registered: June 2008
Junior Member
Hi,
I am sorry. No screen is coming. I am calling the following code mentioned above from a button (When-Button-Pressed Trigger). Upon clicking the button there is no impact.Neither the bad file nor the log file is getting created. In the application server I have set an environmental variable name PATH and have given the path of sqlloader as value. Still there is no impact upon clicking the button. FORM_SUCCESS is not returning TRUE

I am not able to figure out the exact problem. Kindly help me.
I am calling this form from a URL (of my loacl machine)http://servername:2589/forms/frmservlet

Please let me know if any details is required.I need to sort out this issue.
Re: Running Sqlloader in forms10g [message #329382 is a reply to message #329362] Wed, 25 June 2008 04:55 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
What's the rest of your procedure?
Do you have an exceptionhandler, by any chance?
Re: Running Sqlloader in forms10g [message #329390 is a reply to message #329382] Wed, 25 June 2008 05:35 Go to previous messageGo to next message
sri_81_in
Messages: 12
Registered: June 2008
Junior Member
hi,

Yes, I have an exception handler.

Exception when others then
message(sqlerrm||dbms_error_text);
message(' ');
end;
Re: Running Sqlloader in forms10g [message #329437 is a reply to message #329390] Wed, 25 June 2008 07:37 Go to previous messageGo to next message
sri_81_in
Messages: 12
Registered: June 2008
Junior Member
Hi Thanks.I got the solution. I am able to run the sqlloader using forms10g.

Need to create a batch file and access the file from the form.
Thanks...
Re: Running Sqlloader in forms10g [message #361704 is a reply to message #329437] Thu, 27 November 2008 11:20 Go to previous messageGo to next message
sphinx18
Messages: 2
Registered: April 2008
Junior Member
sri_81_in wrote on Wed, 25 June 2008 07:37
Hi Thanks.I got the solution. I am able to run the sqlloader using forms10g.

Need to create a batch file and access the file from the form.
Thanks...

I have the same pb, but i dont understand your solution

You must copy the file to server application ?
i must install sqlloader in client post?

pls help

[Updated on: Thu, 27 November 2008 11:22]

Report message to a moderator

Re: Running Sqlloader in forms10g [message #384999 is a reply to message #329437] Fri, 06 February 2009 00:48 Go to previous messageGo to next message
YKKAP
Messages: 5
Registered: February 2009
Junior Member
sri_81_in wrote on Wed, 25 June 2008 07:37
Hi Thanks.I got the solution. I am able to run the sqlloader using forms10g.

Need to create a batch file and access the file from the form.
Thanks...



What is about the solution?
We got the same problem, would you mind to give us a help?
Re: Running Sqlloader in forms10g [message #385016 is a reply to message #384999] Fri, 06 February 2009 03:12 Go to previous messageGo to next message
Littlefoot
Messages: 20888
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I believe that @sri_81_in has said that he has created a batch script (on MS Windows / DOS it is a file whose extension is .BAT, for example "LOAD_DATA.BAT"). He had put SQLLDR statement in there (such as "SQLLDR scott/tiger CONTROL=test.ctl LOG=test.log") and called the batch script from the Form using the HOST (or CLIENT_HOST) built-in.

So - don't call SQL*Loader directly, but put it into a script and call that script instead.
Re: Running Sqlloader in forms10g [message #385304 is a reply to message #385016] Mon, 09 February 2009 00:48 Go to previous messageGo to next message
YKKAP
Messages: 5
Registered: February 2009
Junior Member
Littlefoot wrote on Fri, 06 February 2009 03:12
I believe that @sri_81_in has said that he has created a batch script (on MS Windows / DOS it is a file whose extension is .BAT, for example "LOAD_DATA.BAT"). He had put SQLLDR statement in there (such as "SQLLDR scott/tiger CONTROL=test.ctl LOG=test.log") and called the batch script from the Form using the HOST (or CLIENT_HOST) built-in.

So - don't call SQL*Loader directly, but put it into a script and call that script instead.


hi,

Thank for your help. Smile
we've created a batch file as extension is .bat(this is content-->
SQLLDR CONTROL=D:\Q3System\ctl_files\load_rec_item.ctl log=D:\Files_for_Q3system\need_files\rec_item.log bad=D:\Files_for_Q3system\need_files\rec_item.bad userid=YKK97/YKK08@NEW_Q3)

Unfortunately, there is no response while run the batch file from the Form using the HOST. but it's available while executed the batch file in the HOST directly.

Did we misundertand what you said?

Re: Running Sqlloader in forms10g [message #385324 is a reply to message #385304] Mon, 09 February 2009 01:53 Go to previous messageGo to next message
Littlefoot
Messages: 20888
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
From the Forms Online Help System:
Quote:
The host command operates on the application server machine. Any screen output that it performs is not visible to the user of the application.

Does your HOST operate on the application server machine?
Re: Running Sqlloader in forms10g [message #385467 is a reply to message #385324] Mon, 09 February 2009 18:22 Go to previous messageGo to next message
YKKAP
Messages: 5
Registered: February 2009
Junior Member
Littlefoot wrote on Mon, 09 February 2009 01:53
From the Forms Online Help System:
Quote:
The host command operates on the application server machine. Any screen output that it performs is not visible to the user of the application.

Does your HOST operate on the application server machine?


Yes, our HOST operate on the application server machine.
Re: Running Sqlloader in forms10g [message #385507 is a reply to message #385467] Mon, 09 February 2009 23:34 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
YKKAP,

You do not need to quote the previous post. We can read more than just your reply.

Plesae confirm that (1) you have a Windows abased application server, (2) you have SQLLDR installed on this application server and (3) "D:\Q3System\ctl_files\load_rec_item.ctl" exists on this application server.

David
Re: Running Sqlloader in forms10g [message #385540 is a reply to message #385507] Tue, 10 February 2009 01:25 Go to previous messageGo to next message
YKKAP
Messages: 5
Registered: February 2009
Junior Member
hi David,

(1) Yes, we have

(2) We've installed this Forms&Reports Services 10.1.2.0.2 on application server but the program without SQLLDR.
And we've installed client 10.2.0.1 on application server with SQLLDR.
These are in two different directory.


(3) Yes, it exists on this application server.

Thanks,

Ming_Chung
Re: Running Sqlloader in forms10g [message #385772 is a reply to message #385540] Wed, 11 February 2009 00:19 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Please post the code you have in your form and please use the 'code' tags facility.

Please place 'message; pause;' pairs in your code to prove that the code has been exercised.

Search this forum for 'host cmd' and 'client_host cmd' and look at the threads where they have discussed when 'cmd' needs to be used.

David
Previous Topic: customize log in window
Next Topic: upload and download
Goto Forum:
  


Current Time: Sat Dec 03 03:59:33 CST 2016

Total time taken to generate the page: 0.11642 seconds