Home » RDBMS Server » Server Utilities » Loading Multiple .csv files with one CTL file (Oracle 10g)
Loading Multiple .csv files with one CTL file [message #299600] Tue, 12 February 2008 11:14 Go to next message
Ravin_C
Messages: 38
Registered: February 2008
Location: United Kingdom
Member
Hi Guys,

I use sqlldr to load .csv files weekly via automated batch processing. Three files with diffrent names each time (same prefix but with current date) have to be loaded. Can you please help me on how to write my control file to cater this?

thanks
Re: Loading Multiple .csv files with one CTL file [message #299601 is a reply to message #299600] Tue, 12 February 2008 11:16 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10672
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
depends on your OS. Simple shell script can do the job
Re: Loading Multiple .csv files with one CTL file [message #299608 is a reply to message #299601] Tue, 12 February 2008 12:01 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
Simple shell script can do the job

And this is the way to do it unless you choose to use an external table.

Regards
Michel
Re: Loading Multiple .csv files with one CTL file [message #299802 is a reply to message #299600] Wed, 13 February 2008 04:30 Go to previous messageGo to next message
Ravin_C
Messages: 38
Registered: February 2008
Location: United Kingdom
Member
My OS is Windows Server 2003, how do i write a shell script?

Please explain, i have not done it before!
Re: Loading Multiple .csv files with one CTL file [message #299813 is a reply to message #299802] Wed, 13 February 2008 05:14 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
So use external table, it is easier than coding windows cmd/bat files.

Regards
Michel
Re: Loading Multiple .csv files with one CTL file [message #299873 is a reply to message #299600] Wed, 13 February 2008 08:14 Go to previous messageGo to next message
Ravin_C
Messages: 38
Registered: February 2008
Location: United Kingdom
Member
External file? How?
Re: Loading Multiple .csv files with one CTL file [message #299880 is a reply to message #299873] Wed, 13 February 2008 08:30 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
No, external TABLE.
http://www.oracle.com/pls/db102/search?remark=quick_search&word=external+table&tab_id=&format=ranked

Regards
Michel
Re: Loading Multiple .csv files with one CTL file [message #299881 is a reply to message #299880] Wed, 13 February 2008 08:35 Go to previous messageGo to next message
Ravin_C
Messages: 38
Registered: February 2008
Location: United Kingdom
Member
I dont get it, please explain?
Re: Loading Multiple .csv files with one CTL file [message #299882 is a reply to message #299881] Wed, 13 February 2008 08:37 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10672
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
With external tables, you treat the external files (text files) like an oracle table. No need to load data into database.
Michel has kindly pointed you to documentation for concepts and examples. Just go through it / search this forum.
Re: Loading Multiple .csv files with one CTL file [message #300832 is a reply to message #299882] Mon, 18 February 2008 03:43 Go to previous messageGo to next message
Ravin_C
Messages: 38
Registered: February 2008
Location: United Kingdom
Member
Hi guys,

I have sorted it, thanks. I missed a syntax (position(1)) in my control file thats all.
Re: Loading Multiple .csv files with one CTL file [message #301294 is a reply to message #299600] Wed, 20 February 2008 00:17 Go to previous messageGo to next message
d.c.b.a
Messages: 44
Registered: March 2005
Location: China
Member

sqlldr control=xxx.ctl data=1.txt

sqlldr control=xxx.ctl data=2.txt

You can share the control file.
Re: Loading Multiple .csv files with one CTL file [message #302959 is a reply to message #301294] Wed, 27 February 2008 07:36 Go to previous message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Hello,
I like to share one problem with external table when we schedule to run daily for load text file from OS system.


I use external table to load export log file in database for checking purpose it is exported successfully or not.

but after scheduing i face ORA-07445 error like below

Errors in file f:\ora10g_home\admin\oramfe\udump\oramfe_ora_4800.trc:
ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [_nsgbliuc+1162] [PC:0x6083370A] [ADDR:0xF060208] [UNABLE_TO_READ] []


Searched on metalink but didn't find anything useful.
so please first test external table option before implement on production database.

Oracle Version: 10.1.0.5.0(cpu july07 patch)
OS: Windows 2003 Server
Previous Topic: fndload upload utility not updating existing concurrent programs
Next Topic: shifting database from Ms Acess to oracle 9i
Goto Forum:
  


Current Time: Fri Dec 09 21:44:34 CST 2016

Total time taken to generate the page: 0.06160 seconds