Home » RDBMS Server » Server Utilities » SQL Loader Unable to open file error (2 Merged) (Oracle 11.2.0 Windows XP)
SQL Loader Unable to open file error (2 Merged) [message #546909] Fri, 09 March 2012 22:45 Go to next message
selasky1
Messages: 3
Registered: March 2012
Location: michigan
Junior Member
Hopefully someone can help me. I am recieving errors when trying to load the control file. The errors are as follows:

SQL*Loader-500 Unable to open file (homework.ctl)
SQL*Loader-553 file not found
SQL*Loader-559 SYstem error: The system cannot find the file specified.

My control file is located directly in the C drive (C:\homework.ctl). The control file contains the following code:

LOAD DATA
INFILE 'c:\country.dat'
APPEND INTO TABLE homework
fields terminated by ',' optionally encloded by '"'
(country, month, day)
WHEN (month='April')

The command I am entering is:

sqlldr system/password control=homework.ctl

I've tried c:\homework.ctl, 'c:\homework.ctl', and placing the file in the BIN folder of Oracle.
Re: SQL Loader Unable to open file error [message #546910 is a reply to message #546909] Fri, 09 March 2012 22:50 Go to previous messageGo to next message
BlackSwan
Messages: 26704
Registered: January 2009
Location: SoCal
Senior Member
It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/

try the following


sqlldr system/password control=\homework.ctl

sqlldr system/password control="\homework.ctl"

one of the two should "work"

In the future use COPY & PASTE to show what you do & how Oracle respond directly from Command Window
Re: SQL Loader Unable to open file error [message #546912 is a reply to message #546910] Fri, 09 March 2012 22:57 Go to previous messageGo to next message
selasky1
Messages: 3
Registered: March 2012
Location: michigan
Junior Member
Hi BlackSwan. Thanks for responding but that didn't work. Still getting the same errors. Does the file need to be stored in a specific place?

Re: SQL Loader Unable to open file error [message #546913 is a reply to message #546912] Fri, 09 March 2012 23:00 Go to previous messageGo to next message
Barbara Boehmer
Messages: 8922
Registered: November 2002
Location: California, USA
Senior Member
The control file can be anywhere, as long as you specify the directory and Oracle has read access to it. What I usually do to ensure that Oracle can find it and has access to it, is create and save it from SQL*Plus.
Re: SQL Loader Unable to open file error [message #546914 is a reply to message #546913] Fri, 09 March 2012 23:03 Go to previous messageGo to next message
Barbara Boehmer
Messages: 8922
Registered: November 2002
Location: California, USA
Senior Member
If your Oracle BIN folder is your default folder, then you should be able to place it there and just use homework.ctl without any directory specified and you should not have an access problem.
Re: SQL Loader Unable to open file error [message #546915 is a reply to message #546914] Fri, 09 March 2012 23:12 Go to previous messageGo to next message
selasky1
Messages: 3
Registered: March 2012
Location: michigan
Junior Member
Hi Barbara. Thanks for you help. How do I know if the BIN folder is the default folder? I place the file in the folder and it didn't work. Working on your other suggestion.
Re: SQL Loader Unable to open file error [message #546917 is a reply to message #546912] Fri, 09 March 2012 23:14 Go to previous messageGo to next message
BlackSwan
Messages: 26704
Registered: January 2009
Location: SoCal
Senior Member
selasky1 wrote on Fri, 09 March 2012 20:57
Hi BlackSwan. Thanks for responding but that didn't work. Still getting the same errors. Does the file need to be stored in a specific place?



which OS user owns the control file?
which OS user owns files within ORACLE_HOME directory tree?
Re: SQL Loader Unable to open file error [message #546918 is a reply to message #546915] Fri, 09 March 2012 23:26 Go to previous message
Barbara Boehmer
Messages: 8922
Registered: November 2002
Location: California, USA
Senior Member
selasky1 wrote on Fri, 09 March 2012 21:12


How do I know if the BIN folder is the default folder?


If you did a standard installation, then that is the default. That is where the sqlldr file is. If you are running sqlldr from that directory, then it will look in that directory. However, if you are running it from some other directory, then it will look in that directory. It will look in other directories if you have them set in your path. If you are using SQL*Plus, running it from a shortcut, then you can check the shortcut properties to see what directory it starts in.

If you save the file from SQL*Plus and run sqlldr from SQL*Plus, using the HOST command, then you do not have to specify directories or worry about permissions. It makes it a lot easier.
Previous Topic: Nested Table query optimization
Next Topic: Copy database
Goto Forum:
  


Current Time: Sat May 30 01:39:52 CDT 2020