Sqlldr issue with Oracle 8i [message #199998] |
Fri, 27 October 2006 06:11 |
sherinpearl
Messages: 6 Registered: October 2006
|
Junior Member |
|
|
I'm loading a dynamically created CSV file to a database table using sqlldr. The csv file has the fist line blank (which cannot be avoided). In Oracle 9i sqlldr loads this file. But in Oracle 8i, sqlldr gives me an error :
SQL*Loader-510: Physical record in data file (D:\RSEnduInterface\RSJavaService\HourlyStationGenFile.csv) is longer than the maximum(1048576)
I have tried SKIP thinking that it will skip the blank line, but it didn't. If i remove the first blank line & then try with Oracle 8i, it gets loaded without any problems. Please advise on how to load this file using oracle 8i.
|
|
|
Re: Sqlldr issue with Oracle 8i [message #200001 is a reply to message #199998] |
Fri, 27 October 2006 06:21 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
>> The csv file has the fist line blank (which cannot be avoided).
Why not? Skip=1 will work.
oracle@mutation#cat t1.dat
0000009921
0000009922
0000009923
0000009924
oracle@mutation#wc -l t1.dat
5 t1.dat
oracle@mutation#cat somectl.ctl
LOAD DATA
infile 't1.dat'
replace
INTO TABLE t1
FIELDS TERMINATED BY ","
OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(
n decimal external
)
oracle@mutation#sqlldr userid=scott/tiger control=somectl.ctl skip=1
SQL*Loader: Release 9.2.0.7.0 - Production on Fri Oct 27 07:23:33 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Commit point reached - logical record count 4
oracle@mutation#query mutation scott.t1
N
----------
9921
9922
9923
9924
[Updated on: Fri, 27 October 2006 06:22] Report message to a moderator
|
|
|
Re: Sqlldr issue with Oracle 8i [message #200005 is a reply to message #199998] |
Fri, 27 October 2006 06:41 |
sherinpearl
Messages: 6 Registered: October 2006
|
Junior Member |
|
|
Thanks for the reply. I have tried skip = 1. It works if the first line has atleast a whitespace, but when i tried with the first line having only a newline character(Pressed 'ENTER' in Textpad) skip doesn't work, rather sqlldr gives me error.
My control files looks like this :
load data
infile 'D:\RSEnduInterface\RSJavaService\HourlyFuelFile.csv'
into table USER_RS_HOURLY_FUEL_TBL
fields terminated by "," optionally enclosed by '"'
( fuel_name CHAR, iteration INTEGER EXTERNAL, fuel_date "to_date(:fuel_date,'DD/MM/YYYY')", hb CHAR, fuel_used DECIMAL EXTERNAL )
Please help
|
|
|
|
Re: Sqlldr issue with Oracle 8i [message #200013 is a reply to message #199998] |
Fri, 27 October 2006 07:14 |
sherinpearl
Messages: 6 Registered: October 2006
|
Junior Member |
|
|
Following is the error i have got :
SQL*Loader-510: Physical record in data file (D:\RSEnduInterface\RSJavaService\HourlyFuelFile.csv) is longer than the maximum(1048576)
I have attached a sample data file(HourlyFuelFile.csv)
My table schema is :
CREATE TABLE user_rs_hourly_fuel_tbl (
fuel_name VARCHAR2(50) NOT NULL,
iteration NUMBER NULL,
fuel_date DATE NULL,
hb VARCHAR2(20) NULL,
fuel_used FLOAT(126) NULL
)
|
|
|
|
Re: Sqlldr issue with Oracle 8i [message #200241 is a reply to message #199998] |
Sun, 29 October 2006 22:14 |
sherinpearl
Messages: 6 Registered: October 2006
|
Junior Member |
|
|
I'm not working on a Unix machine, But on a windows machine. Anyway removing ^M characters didn't help. I have tried loading the file in both Oracle 8i & Oracle 9i. It works perfectly in Oracle 9i. But the problem occurs when trying to load with Oracle 8i. My development environment has Oracle 9i, But in production, it's Oracle 8i. So i need to solve this issue somehow & it's very urgent.. Please help.
|
|
|
|
|
Re: Sqlldr issue with Oracle 8i [message #200333 is a reply to message #200276] |
Mon, 30 October 2006 06:55 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
You are lucky . As of now, i could not even login into metalink.
Seems it is down.
And just a suggestion ( as i myself had done this before)
Did you search for 165317.1. or
165317.1 ?
Thats was typo in my previous post.Try it without the trailing period. Apologies.
[Updated on: Mon, 30 October 2006 09:05] Report message to a moderator
|
|
|
Re: Sqlldr issue with Oracle 8i [message #200394 is a reply to message #200333] |
Mon, 30 October 2006 12:58 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
https://metalink.oracle.com/metalink/plsql/f?p=130:3:4084359846954528120::::p3_database_id,p3_docid,p3_show_header,p3_show_help,p3_bl ack_frame,p3_font:NOT,165317.1,1,1,1,helvetica
|
|
|
|
|