SQL*Loader output issue
Hi,
When I load a flat file with SQL*Loader (V 8.1.7 on Windows), I get output something like,
Commit point reached - logical record count 2352
Commit point reached - logical record count 2364
Commit point reached - logical record count 2376
Commit point reached - logical record count 2388
Commit point reached - logical record count 2400
If I want to change this, say I want this message for each 1000 records inserted, how can I do that?
I have tried options line bindsize or rows, but looks like they are for changing internal operation, but not this screen output.
Off course, I am talking about conventional path load.
Any ideas?
Thanks
set rows=1000 and increase the bindsize drastically.
From the docs here
If that size fits within the bind array maximum, the load continues--SQL*Loader does not try to expand the number of rows to reach the maximum bind array size. If the number of rows and the maximum bind array size are both specified, SQL*Loader always uses the smaller value for the bind array.
Similar Messages
-
SQL*Loader: Release 11.1.0.7.0 - Production on Thu Mar 18 07:21:37 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
SQL*Loader-350: Syntax error at line 1.
Expecting keyword LOAD, found "ÐÏ".
ÐÏࡱá
^
My sqlldr file looks like this:
sqlldr control=C:\data\ctl\ss.ctl log=C:\data\logs\ss.log userid=User/Password errors=999 discard=C:\data\discard\ss.dis
control file looks like this:
LOAD DATA
INFILE 'C:\data\SS.TXT' "STR '\r\n'"
REPLACE
INTO TABLE SS
FIELDS TERMINATED BY ';'
TRAILING NULLCOLS
ACCOUNT_NBR CHAR,
ADDR1 CHAR,
ADDR2 CHAR,
ADDR3 CHAR,
ADDR4 CHAR,
CITY CHAR,
STATE CHAR,
ZIPCODE CHAR ,
more columns all of the are the same syntax column name and char
I can load this table using the enterprise manager but when using the sqlldr its not working.
Anything stand out?
Edited by: mlojan on Mar 18, 2010 5:33 AMOnly thing I can think of is there is some character set issue between the control file and the operating syste/oracle server.
You did you create the control file using a text based editor such as notepad or wordpad didn't you? You haven't used something like MS Word? -
How do i get sql loader to recognize recognize AM/PM. My control file is below. The error I get is syntax error at line 14. Expecting field-name, found ")".
OPTIONS ( SKIP=0)
LOAD DATA
INFILE '/ftp_data/labor_scheduling/kronos_punch_temp/kronos_punches.csv'
BADFILE '/ftp_data/labor_scheduling/kronos_punches/kronos_punches.bad'
DISCARDFILE '/ftp_data/labor_scheduling/kronos_punches/kronos_punches.dsc'
INTO TABLE "STAFFING"."KRONOS_TEMP_PUNCHES"
TRUNCATE
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
(EMPLOYEE_ID,
SCHEDULE_DATE DATE "MM/DD/YY",
PUNCH DATE "MM/DD/YY HH:MI AM"
)Hi Gary,
Could your problem be with this?
(EMPLOYEE_ID,You have no data type for that field.
Regards
Peter -
Hello
Using Oracle 11g, I am trying to load a table from data in csv files with oracle SQL Loader,
table : purchase
control file : purchase.ctl
Even if I am giving the right path for control file I still get the error :
SQL*Loader-500: Unable to open file (purchase.dat)
SQL*Loader-553: file not found
SQL*Loader-509: System error: The system cannot find the file specifiedSo why is SQL Loader looking for the file purchase.dat??
Any help is appreciatedTalend is the right solution to load data. Now about your problem, have you configured Talend in order to transfer the data? Because Talend can easily transfer the files.
Maybe you might be able to go to the Talend website to get more information there: http://www.talend.com/ -
SQL*Loader permission issue?
I have set up a run_all script on LINUX to invoke SQL*Loader for each table to be loaded. I can run this as the Oracle owner just fine. When I try to let the developer run this on dev, they get the following:
SQL*Loader: Release 9.2.0.1.0 - Production on Tue Apr 25 08:55:18 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL*Loader-128: unable to begin a session
ORA-01034: ORACLE not available
ORA-27121: unable to determine size of shared memory segment
Linux Error: 13: Permission denied
They can use SQL*Plus on the command line with the userid and password from the SQL*Loader file. I don't want to have to run these for them every time, so any help or ideas would be greatly appreciated!Hi
Has the same ORACLE_HOME variable value of the Oracle owner and the developer?
Ott Karesz
http://www.trendo-kft.hu -
SQL*LOADER connection issue
I have oracle 9i installed, if i'm to connect to the database using the sys account i getv a message saying have to connect as sysdba or sysoper. Ok so i use "username/password@database as sysdba", and that works fine i'm able to connect. But this does not work at the inital login screen, i have to connect as using this other account i created then log in useing the string above. My problem is now im using SQL*LOADER to load data into a table and it won't accept the connection string. If it use that connction string listed above i get the error "ORA-12154:could not resolve service name" and if i remove "as sysdba" from the end of the string i get error "ORA-01017: invalid username/password". I use to be able to just log on with just "sys" username is there any way to change it back or any other way to log on to SQL*LOADER. Any help would be appreciated. Thanks
When you are working with SQL*Loader, SQL*Plus and other utilities you can specify what is the database to be connected through local naming (client, server ) or seeting an enviroment variable in the session. If you are getting connection in the server and you have problems resolving local naming, I recommend you to do this:
1.- Set the ORACLE_SID enviroment variable and do not use local naming resolving with tnsnames.ora entries
2.- Configure very well the tnsnames.ora & sqlnet.ora files to get connection.
If you are working directly in the server the first option is easier.
Setting the variable in Windows:
SET ORACLE_SID=<database_sid>
Setting the variable in Unix/Linux:
export ORACLE_SID=<database_sid>
if you need more help to do this step by step I can help you.
Joel Pérez -
Sql loader - to_date() issue
How do I load the date field from the CSV *"03-Dec-09 10.06.58.00 PM"* into oracle tables using sql loader ?
The contol file is as follows:
LOAD DATA
INTO TABLE
CUSTOMER
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
(CUST_ID,
ORDER_DATE "to_date(:ORDER_DATE, 'DD-MON-YY HH:MI:SS.TT AM')"
but it doesn't work, I also tried _ORDER_DATE "DD/MM/YYYY"_ with no luck, any suggestion ?
I am kind of new in using SQL LOADER.
thanks.The CSV sample you provided uses " *.* " in the time-component [ 10.06.58.00 ] while your SQL Loader Control file is expecting " *:* " [ HH:MI:SS.TT ]. These two formats are obviously not the same. Update your control file and try again.
CUST_ID, ORDER_DATE
1,03-Dec-10 10.06.58.00 PM
2,03-Dec-09 10.07.18.00 PM
3,03-Dec-11 04.07.18.00 AM
4,01-Dec-07 10.07.18.00 PM
5,03-Dec-10 10.07.18.00 AM
6,12-Dec-10 10.07.18.00 PM
CONTROL FILE Which "doesn't work "
LOAD DATA
INTO TABLE
CUSTOMER
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
(CUST_ID,
ORDER_DATE "to_date(:ORDER_DATE, 'DD-MON-YY HH:MI:SS.TT AM')"
{code}
Edited by: user130038 on Sep 9, 2011 6:56 AM -
SQL loader import issue..
Hi,
I am working on 10g database on ibm AIX ..
i need to use sql loader and insert some data in to table using a input file.
The input file contains follwing format..- data.dat
001 901 200 1611196 "dis
ltype
gu" Mhamicddu kuasa 12as king
all these values are tab deliminated and one column value "disltypegu" is enclosed by " " and in next line. This "disltypegu" shuld be inserted in to one column.
I am using following control file..
LOAD DATA
INFILE '/home/oracle/data.dat'
INSERT INTO TABLE emp
(e1,e2,e3,e4,e5,e6,e7,e8,e9)
any idea ...wht all things i need to include in my control file to perform this insert...
I am using below control file ..
LOAD DATA
INFILE '/home/oracle/data1.csv'
APPEND
INTO TABLE emp
FIELDS TERMINATED BY X'09'
OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(ename,edd,emob)
By using this control file , we can import tab delemenated and enclosed by "" column ...it is working ..
Only thing is if some column data is in next row , it is treating it as a second row and inserting in to new row..
How to insert data in to one row..
This is my data file ... with 3 column values .. ( ename -Robin , edd - Address , emob - 13)
Robin "Address"
13
but it is inserting emob value (13) in ename ...like next line as a new row...oradba11 wrote:
Hi,
I am working on 10g database on ibm AIX ..
i need to use sql loader and insert some data in to table using a input file.
The input file contains follwing format..- data.dat
001 901 200 1611196 "dis
ltype
gu" Mhamicddu kuasa 12as king
all these values are tab deliminated and one column value "disltypegu" is enclosed by " " and in next line. This "disltypegu" shuld be inserted in to one column.
I am using following control file..
LOAD DATA
INFILE '/home/oracle/data.dat'
INSERT INTO TABLE emp
(e1,e2,e3,e4,e5,e6,e7,e8,e9)
any idea ...wht all things i need to include in my control file to perform this insert...
I am using below control file ..
LOAD DATA
INFILE '/home/oracle/data1.csv'
APPEND
INTO TABLE emp
FIELDS TERMINATED BY X'09'
OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(ename,edd,emob)
By using this control file , we can import tab delemenated and enclosed by "" column ...it is working ..
Only thing is if some column data is in next row , it is treating it as a second row and inserting in to new row..
How to insert data in to one row..
This is my data file ... with 3 column values .. ( ename -Robin , edd - Address , emob - 13)
Robin "Address"
13
but it is inserting emob value (13) in ename ...like next line as a new row...How is this data file created and what processes (automated AND manual) does it pass through before coming to sqlloader? It looks to me like it is getting manually copied and pasted from notepad with line wrap turned on. You really need to address why the data is being wrapped across multiple lines (records).
Edited by: EdStevens on Mar 13, 2012 7:48 AM -
Hello,
I'm having an issue with the formatting of a date. My csv file, exported from another ora table, has the date in full date format ()
I get the error:
Record 12: Rejected - Error on table LOAN_VER_REQ_ARCH, column ORIGINATION_DATE.
ORA-01843: not a valid monthand two other fields that are date fields get similar errors.
Dates in .csv file appear as such:
For example - 10/26/2001 0:00:00
The question is in my ctl file, how do I format?
I've tried to_char(ORIGINATION_DATE,'MM-DD-YYYY') or
to_date(ORIGINATION_DATE,'MM-DD-YYYY') These dont' work. I don't recall doing any of this stuff in Ora 9i, but perhaps I wasn't loading date fields before in any tables I uploaded data into.
Any tips would be appreciated. I get a message on the command prompt about:
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Commit point reached - logical record count 39
Commit point reached - logical record count 78but that's incorrect because no records are going into the table. I'll worry about that part later though if I can get this date thing resolved.
Thanks!user515689 wrote:
Hello,
I'm having an issue with the formatting of a date. My csv file, exported from another ora table, has the date in full date format ()
I get the error:
Record 12: Rejected - Error on table LOAN_VER_REQ_ARCH, column ORIGINATION_DATE.
ORA-01843: not a valid monthand two other fields that are date fields get similar errors.
Dates in .csv file appear as such:
For example - 10/26/2001 0:00:00
The question is in my ctl file, how do I format?
I've tried to_char(ORIGINATION_DATE,'MM-DD-YYYY') or
to_date(ORIGINATION_DATE,'MM-DD-YYYY') These dont' work. I don't recall doing any of this stuff in Ora 9i, but perhaps I wasn't loading date fields before in any tables I uploaded data into.
Any tips would be appreciated. I get a message on the command prompt about:
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Commit point reached - logical record count 39
Commit point reached - logical record count 78but that's incorrect because no records are going into the table. I'll worry about that part later though if I can get this date thing resolved.
Thanks!Well, the sample string you've provided doesn't match the formats you've been attempting to use. Yours are separated with a hyphen whereas your sample data is separated by a slash.
Is ALL the data in the same format?
If so, perhaps this (based on your sample string)....
TUBBY_TUBBZ?select to_date('10/26/2001 0:00:00', 'mm/dd/yyyy HH24:MI:SS') from dual;
TO_DATE('10/26/20010
26-OCT-2001 12 00:00
1 row selected.
Elapsed: 00:00:00.01As for specifying this in the control file
http://download.oracle.com/docs/cd/B10501_01/server.920/a96652/ch09.htm#1011137
(you mentioned Oracle 9, so i'm not sure if that's the version you are still on or not).
Edited by: Tubby on Jul 27, 2010 11:50 AM
Added link to documentation. -
The output of sql loader displays '?' for the chinese character
I'm run the sql loader to import the data. The following is the ctl script:
LOAD DATA
CHARACTERSET ZHS16CGB231280
APPEND
INTO TABLE xxabc_gti_feedback
when (5:6) ='~~' and (8:9)='~~'
FIELDS TERMINATED BY "~~"
TRAILING NULLCOLS
absoluted
,exist_lists
,invoice_type
,invoice_category_code
,invoice_number
,line_count
,invoice_date DATE "YYYYMMDD"
,invoice_month
,trx_number
,amount_without_tax
,tax_rate
,tax_amount
,gti_feedback_id "xxban_gti_feedback_s.nextval"
,creation_date sysdate
,last_update_date sysdate
EBS version: R12(12.0.4)
The characterset of database is UTF-8
The file characterset is GB2312
The following is the example of data file.
SJJK0201~~已开发票传出
39~~20110413~~20110413
//发票1
0~~0~~0~~325676740~~11085979~~3~~20110413~~04~~~~3336.71~~0.17~~567.24~~珠海XX机电设备有限公司~~440407897878~~珠海市香洲区XXX 0756-3666666~~建行前山支行777777~~XX电子(苏州)有限公司~~32170078678890~~苏州工业园区 6267565~~中国银行园区支行25456672~~1653\n31263\n67126~~XXX~~XXX~~XXX
0~~aaa~~P83782~~个~~2~~6854.70~~0.17~~1165.30~~4010~~1~~1601
1~~bbb~~~~~~~~-4065.00~~0.17~~-691.05~~~~1~~1601
0~~ccc~~P80792~~个~~4~~547.01~~0.17~~92.99~~160~~1~~1601
I create a sql*loader concurrent program to load the data. the data can be loaded into the table successfully(The chinese customer name is correct). Only for the aborted lines, it will be listed in the outtput of the concurrent request, but out of my expect, the chinese characters in the output are displayed as '?'.
How to solve the issue? Thanks.
Edited by: 852938 on 2011-4-17 下午10:41like the following:
SJJK0201~~??????????
39~~20110413~~20110413
//???1
0~~aaa~~P83782~~??~~2~~6854.70~~0.17~~1165.30~~4010~~1~~1601
1~~bbb~~~~~~~~-4065.00~~0.17~~-691.05~~~~1~~1601
0~~ccc~~P80792~~??~~4~~547.01~~0.17~~92.99~~160~~1~~1601
You can find that any chinese characters are became '?'. The loaded line(Line 4th) is not listed in the output.
Thanks for your quick answer! :) -
How to load XML file to table (non-XML) with SQL*Loader -- issue with nulls
I have been attempting to use SQL*Loader to load an XML file into a "regular" Oracle table. All fields work fine, unless a null is encountered. The way that nulls are represented is shown below:
<PAYLOAD>
<FIELD1>ABCDEF</FIELD1>
<FIELD2/>
<FIELD3>123456</FIELD3>
</PAYLOAD>
In the above example, FIELD2 is a null field and that is the way it is presented. I have searched everywhere and have not found how I could code for this. The issue is that if FIELD2 is present, it is coded like: <FIELD2>SOMEDATA</FIELD2>, but the null is represented as <FIELD2/>. Here is a sample of the control file I am using to attempt the load -- very simplistic, but works fine when fields are present:
load data
infile 'testdata.xml' "str '<PAYLOAD>'"
TRUNCATE
into table DATA_FROM_XML
FIELD1 ENCLOSED BY '<FIELD1>' AND '</FIELD1>',
FIELD2 ENCLOSED BY '<FIELD2>' AND '</FIELD2>',
FIELD3 ENCLOSED BY '<FIELD3>' AND '</FIELD3>')
What do I need to do to account for the way that nulls are presented? I have tried everything I could glean from the web and the documentation and nothing has worked. Any help would be really appreciated.I hadn't even got that far. can you direct me to where the docs are to import data that is stored within xml but that you don't need any xml functionality, that just happens to be the format the data is stored in? thx
-
SQL Loader and whitespace issues
Hello users,
I've got an issue that I know is breaking based on a comments field, which allows nearly every type of character in it.
Long story short, I'm trying to upload an Access table, turned to .csv file into Oracle via SQL Loader.
I'm able to do it if I delete or set the COMMENTS column to null before doing so.
If I try the option with the contents of this field populated, it blows up. I've got it terminated by a tilde in the control file, which the COMMENTS field does not contain at all, even with some 5.000+ records.
However, people upon entering comments have put many carriage returns in there. I noticed once I export the data to text or csv, then open in Excel, it shows the column breaking and spilling over into fields it shouldn't, thereby causing the big problem.
I've been searching but haven't found a way I can wrap these whitespaces or have SQL Loader ignore them.
I can't use TERMINATED BY WHITESPACE in the SQL Loader control file because that will cause the field to break without all the comments and I can't use optionally enclosed by " because these people have also used " in the COMMENTS field.
Do I have any option here, other than to brute force make an update query of some kind to manually populate the data? I can do that if I have to but i'd sure rather have all the data dump in via SQL Loader if I can.
Thanks!Actually, it wasn't related to the size of the column. I made it like 3000, to hold 3000 characters, which was plenty.
But I used
PRESERVE BLANKS and then it worked fine! -
How to display output of SQL Loader in a readable format
Hi All,
We have an inbound interface wherein we are uploading data from a flat file to Oracle Applications.
The entire process is happening in a request set -
1. Loading from flat file to staging tables via SQL Loader
2. Validating Data in staging tables
3. Uploading in Oracle standard tables
User says that the log file which shows the output of SQL Loader (step 1) is not readable and they want the data in some particular format which is understandable/readable for them.
Firstly, help me understand is it possible.
Also I have heard about BAD file, can anyone tell me where is it created and by what name and can we fetch that file created ?
Any pointers would be really helpful.
Regards,
ShrutiHi
DATA :
w_i TYPE i VALUE 1,
w_temp TYPE i VALUE 1..
WHILE w_temp LE 10.
w_i = 1.
WHILE w_i LE w_temp.
WRITE :
w_i.
ADD 1 TO w_i.
ENDWHILE.
SKIP.
ADD 1 TO w_temp.
ENDWHILE.
Regards
Pavan -
SQL*Loader issue with WHEN command
Environment: R12.1.2
We have a file coming in from a bank that needs to be loaded into a custom table using SQL*Loader.
The file has multiple record formats. Each record in the file starts with a "record type", which defines the format.
For simplicity, let me say that there is a record type of "H" with the header format, and another record type "D" has a detail record format. An "H" record may be followed by multiple "D" records until the next "H" record is encountered. Unfortunately, there is no common key, like say "Vendor Number" in both the "H" and "D" records to establish a relationship. So the plan was to use a Oracle sequence or SQL*Loader sequence to get a sequence loaded into the table as the file is being loaded. Then if consecutive "H" records had a sequence value of 100 and 112, we would know that the "D" records for the "H" 100 record are all the records with sequence value of 101 through 111.
The issue occurs as we have to use the WHEN command in the control file to direct a certain record type to specific columns of the table. Based on the populated sequence values, with the WHEN command, it seems that all the "H" records get loaded first followed by the "D" records. The sequence becomes of no use and we cannot establish a link between the "H" and "D" records. The alternative is to not use WHEN with the sequence, but load the file into generic column names which provides for less understanding in the application.
Is there a way (command feature) to ensure that SQL*Loader loads the records sequentially while using WHEN?
Thanks
SatishI used RECNUM parameter instead of sequence and it worked fine
-
Urgent :SQL Loader Arabic Character Set Issue
HI all,
I am loading arabic characters into my database using SQL Loader using a fixed length data file. I had set my characterset and NLS_LANG set to UTF8.When I try to load the chararacter 'B' in arabic data i.e. ' لا ' , it gets loaded as junk in the table. All other characters are loaded correctly. Please help me in this issue and its very urgent.
Thanks,
KarthikHi,
Thanks for the responses.
Even after setting the characterset to arabic and the problem continues to persist. This problem occurs only with the character "b".
Please find my sample control file,input file and nls_parameters below:
My control file
LOAD DATA
characterset UTF8
LENGTH SEMANTICS CHAR
BYTEORDER little endian
INFILE 'C:\sample tape files\ARAB.txt'
replace INTO TABLE user1
TRAILING NULLCOLS
name POSITION(1:2) CHAR(1),
id POSITION (3:3) CHAR(1) ,
salary POSITION (4:5) CHAR(2)
My Input file - Fixed Format
?a01
??b02
?c03
The ? indicates arabic characters.Arabic fonts must be installed to view them.
NLS_PARAMETERS
PARAMETER VALUE
NLS_LANGUAGE ARABIC
NLS_TERRITORY UNITED ARAB EMIRATES
NLS_CURRENCY ?.?.
NLS_ISO_CURRENCY UNITED ARAB EMIRATES
NLS_NUMERIC_CHARACTERS .,
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD/MM/RR
NLS_DATE_LANGUAGE ARABIC
NLS_SORT ARABIC
NLS_TIME_FORMAT HH12:MI:SSXFF PM
NLS_TIMESTAMP_FORMAT DD/MM/RR HH12:MI:SSXFF PM
NLS_TIME_TZ_FORMAT HH12:MI:SSXFF PM TZR
NLS_TIMESTAMP_TZ_FORMAT DD/MM/RR HH12:MI:SSXFF PM TZR
NLS_DUAL_CURRENCY ?.?.
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS CHAR
NLS_NCHAR_CONV_EXCP FALSE
Maybe you are looking for
-
Help! OS 10.4.10 crashes our PowerMAC G5 from 10.4.6
Here’s a rundown, sorry if a bit lengthy. I bought my wife an iPhone as a present a couple of days ago. She commences to activate it last night, but iTunes mentioned she needs the latest version. I don’t know what she had in the first place. But she
-
Display a Word Document in the Output
Hi All , I would like to display a word document in the Output . I cheked the demo application 'ZIOS_TEST_SIMPLE_MS' , but i am not able to see the Word Document in the output. Do we need to do any settings or configuration to be done to use these co
-
Webkit.dll crash on launch
Hello. At least one user of our Flex desktop application, who was formerly able to run it normally, now has an issue in which the application crashes shortly after opening. Facts: The user is running Windows XP SP3. The Application event log shows "F
-
How can i shutdown the database (not instances) from RMAN? when i say shutdown immediate, it is shutting down the instance, but not the whole database and when i use startup mount, it complain that the database is already in open state.
-
PHP Help with inherited database site
Hope someone can help with this, although I might be a bit vague. (But will be happy to post any code that might help.) Basically I do a few sites for a company, and everything is coming together nicely moving everything to a new reseller hosting acc