Sqlloader from unix box [message #329730] |
Thu, 26 June 2008 06:19 |
sri_81_in
Messages: 12 Registered: June 2008
|
Junior Member |
|
|
Hi,
I am not able to run sqlloader from unix box. In windows it is working fine. I have created a batch file which is internally calling the sqlloader. I am using host(/oracle/or92/ldr.bat)
The batch file exists in the above mentioned path
The batch file is like this:
ORACLE_HOME=/export/home/Ora9i
export ORACLE_HOME
ORACLE_SID=sert
export ORACLE_SID
PATH=/export/home/Ora9i/bin
cd /export/home/Ora9i/bin
sqlldr userid=as/ew@sert control=INS.CTL data=abc.dat
This batch file is working fine. But from forms it is not working. Kindly help me.
|
|
|
|
Re: Sqlloader from unix box [message #329906 is a reply to message #329745] |
Fri, 27 June 2008 00:56 |
sri_81_in
Messages: 12 Registered: June 2008
|
Junior Member |
|
|
Hi,
No error message. In the when button pressed trigger I have given like this.Upon clicking the button there is no impact. Meaning no error message.
if get_application_property(OPERATING_SYSTEM) IN ('MSWINDOWS','MSWINDOWS32','WIN32COMMON') THEN
msqlldr := 'c:\ldr.bat';
host('c:\ldr.bat');
ELSIF
get_application_property(OPERATING_SYSTEM) IN ('UNIX') THEN
HOST('/oracle/stk/mds/loader.sh');
end if;
|
|
|
Re: Sqlloader from unix box [message #329918 is a reply to message #329906] |
Fri, 27 June 2008 01:20 |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
Did you check if this condition is actually true?
get_application_property(OPERATING_SYSTEM) IN ('UNIX')
You need to learn how to debug your code. Check which parts are executed and which parts are not. Then find out what happens (e.g. is there a shell getting opened? etc)
"No impact, meaning no error message" is NOT a developer's way of telling others what happens.
|
|
|
|
Re: Sqlloader from unix box [message #329926 is a reply to message #329918] |
Fri, 27 June 2008 01:33 |
sri_81_in
Messages: 12 Registered: June 2008
|
Junior Member |
|
|
Hi,
I am getting "UNIX" as the OS. I didn't paste the code. After that message statement, the only thing that needs to be executed is the HOST command.
The program ends after that. GET_APPLICATION_PROPERTY(OS) is returning UNIX only.
|
|
|
Re: Sqlloader from unix box [message #329928 is a reply to message #329920] |
Fri, 27 June 2008 01:39 |
sri_81_in
Messages: 12 Registered: June 2008
|
Junior Member |
|
|
Hi,
Please find the actual coding
declare
msqlldr varchar2(300) ;
begin
IF get_application_property(OPERATING_SYSTEM) IN ('MSWINDOWS','MSWINDOWS32','WIN32COMMON') THEN
msqlldr := 'c:\ldr.bat';
host('c:\ldr.bat');
ELSIF
get_application_property(OPERATING_SYSTEM) IN ('UNIX') THEN
message('Unix OS');
host('ls>tempabcd.txt');
HOST('/exe/home/Ora/bin/loader.sh');
--This HOST command is not getting executed.
ELSE
message('Incorrect Operating System');
END IF;
exception
when others then
message(sqlerrm);
message(dbms_error_text);
end;
|
|
|
Re: Sqlloader from unix box [message #329946 is a reply to message #329928] |
Fri, 27 June 2008 02:15 |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
Does the ls-command get executed properly?
How do you know? Do you see a terminal screen?
What's the full access list on loader.sh? Is it executable?
Why not redirect the output from the second host-command to a file?
|
|
|
Re: Sqlloader from unix box [message #330815 is a reply to message #329946] |
Tue, 01 July 2008 07:03 |
sri_81_in
Messages: 12 Registered: June 2008
|
Junior Member |
|
|
Hi,
Sorry for the late response.
When invoking sqlloader from forms, I am getting the following message.
SQL*Loader: Release 9.2.0.1.0 - Production on Fri Jun 27 04:15:50 2008
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL*Loader-128: unable to begin a session
ORA-12705: invalid or unknown NLS parameter value specified
NLS_LANG is specified in the ldr file. Then also this error message is shown. What can be the problem.
|
|
|
Re: Sqlloader from unix box [message #330818 is a reply to message #330815] |
Tue, 01 July 2008 07:15 |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
- can you use the ctl and data-file combination from a plain unix session?
- if so, compare the settings in your unix-session to the settings in the session created from the Forms' host-command
|
|
|