SQL Loader for mainframe platform
Hi all,
Is there any utility on mainframe platform that corresponds to SQL*Loader in Windows/Unix?
Thanks
Edited by: Valli on Feb 25, 2010 11:38 AM
Pl specify which mainframe version/OS. Pl see if this link helps
http://download.oracle.com/docs/cd/B19306_01/server.102/b25396/tools.htm#sthref261
HTH
Srini
Similar Messages
-
SQL loader for empty field at the end of the line
Hi,
I have following data file for sql loader. I am using Oracle 11.2. The table structure is table_a(id number, name varchar2(32), nbr number).
1, zzzz, 123
2, bbb,
3, ccc, 33
4, ddd,
Currently, I am using "TERMINATED BY ',' " in the control file for SQL loader. However row2 and row4 were thrown into the bad file. Any suggestion for me to load row2 and row4 into the table as well?
Thanks,Two of three columns in your table are named with reserved words.
My first suggestion is to run this query:
SELECT keyword
FROM v$reserved_words
ORDER BY 1;My second suggestion is that your read the FAQ and learn how to use tags to post listings to these forums so we can read what you post.
My third suggestion is that you go to my SQL*Loader Demos page of my website:
http://www.morganslibrary.org/reference/sqlloader.html
and look up "TRAILING NULLCOLS." -
Download SQL Loader for client
Hi, I have been searching for a download of SQL Loader which will work from a client machine. Can someone post a link to the most recent version please?
Edited by: 934989 on May 17, 2012 5:36 AM934989 wrote:
Hi, I have been searching for a download of SQL Loader which will work from a client machine. Can someone post a link to the most recent version please?Oracle Database 11g Release 2 Client (11.2.0.1.0) for Microsoft Windows (x64)
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win64soft-094461.html
Oracle Database 11g Release 2 Client (11.2.0.1.0) for Microsoft Windows (32-bit)
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win32soft-098987.html
Thanks,
Hussein
Edited by: MarkP on May 22, 2012 10:59 AM - Please don't link directly to download files since license acceptance is required. -
SQL Loader for Enclosed values.
i have a data file having '|' seperated values:
|1|ABC|XYZ||123|891|11|8|9|WELL|
all values are enclosed in |. some values can be null.
the control file looks like,
LOAD DATA
INFILE contact.dat
append INTO TABLE Contact
FIELDS TERMINATED BY '|'
ADDRESSID,
FNAME,
LNAME,
NOTES,
PHONENUM,
PHONEEXT,
CONTACTINT,
RESPCODE,
SEQNUMBER,
TITLE
this script is not inserting any values in table. kindly help!looks fine on 10.2.0.1
SQL> create table contact (
2 addressid varchar2(10)
3 ,fname varchar2(10)
4 ,lname varchar2(10)
5 ,notes varchar2(10)
6 ,phonenum varchar2(10)
7 ,phoneext varchar2(10)
8 ,contactint varchar2(10)
9 ,respcode varchar2(10)
10 ,seqnumber varchar2(10)
11 ,title varchar2(10)
12 )
13 /
Table created.
SQL> !sqlldr test/test control=contact.ctl
SQL> select * from contact;
ADDRE FNAME LNAME NOTES PHONENUM PHONEEXT CONTACTINT RESPCODE SEQNUMBER TITLE
1 ABC XYZ 123 891 11 8 9
SQL> spool off;What about a contact.log file, is there any reason specified why no rows were inserted?
Perhaps you are trying to insert a character into column where number is expected.
Ants -
Error loading large field with sql loader for 8i
I want to load a large field (30K) to a database, where I use "long" datatype for it. But I can't because it loads hexadecimal characters, or it get stuck in a loop and does not load anything. I have tried using clob and long in the database and using char(40000), char, and log varraw in the control file. Any idea or suggestion?
Thanks a lot.Hi,
from what I see you are running sqllldr in Windows and your database server is on AIX. Is it a remote server or a local network server?
The ORA-12170 error can be raised for many reasons: firewall issue, database down, listener down, bad sqlnet.ora parm, network trouble, etc
If your network is slow maybe that is the reason. You may post also SQLNET.ORa configuration and try to reconfigure parameters SQLNET.INBOUND_CONNECT_TIMEOUT, SQLNET.SEND_TIMEOUT, SQLNET.RECV_TIMEOUT in sqlnet.ora to larger values.
If your problem is not solved, please post your SQLNET.ORA configuration.
You can check here for details about setting it: Profile Parameters.
Regards.
Al -
What do I need to download to be able to install sql loader for 10G database? 10.2.0.4 to be exact. needed for Window server 2003
user597971 wrote:
What do I need to download to be able to install sql loader for 10G database? 10.2.0.4 to be exact. needed for Window server 2003Hi,
SQLLDR is already part of the Oracle Database 10g Release 2 Utilities
all you have to do is
run -----> cmd
cd ORACLE_HOME\bin\sqlldr help=y
see this link
http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14215/ldr_control_file.htm#sthref815 -
How to load a default value in to a column when using sql loader
Im trying to load from a flat file using sql loader.
for 1 column i need to update using a default value
how to go about this?Hi!
try this code --
LOAD DATA
INFILE 'sample.dat'
REPLACE
INTO TABLE emp
empno POSITION(01:04) INTEGER EXTERNAL NULLIF empno=BLANKS,
ename POSITION(06:15) CHAR,
job POSITION(17:25) CHAR,
mgr POSITION(27:30) INTEGER EXTERNAL NULLIF mgr=BLANKS,
sal POSITION(32:39) DECIMAL EXTERNAL NULLIF sal=BLANKS,
comm POSITION(41:48) DECIMAL EXTERNAL DEFAULTIF comm = 100,
deptno POSITION(50:51) INTEGER EXTERNAL NULLIF deptno=BLANKS,
hiredate POSITION(52:62) CONSTANT SYSDATE
)-hope this will solve ur purpose.
Regards.
Satyaki De. -
SQL*Loader and HTMLDB_APPLICATION_FILES
Hello!
Can I use SQL*Loader for loading data from file stored in HTMLDB_APPLICATION_FILES as blob to tables in database? Files are always CSV in my case.
Best regards,
TomHello Maxim!
Of course files are stored in HTMLDB_APPLICATION_FILES as blobs and of course I can do 'select blob_content from htmldb.....' - BUT I have to get text from this blob, and copy certain words from this blob, NOT the blob itself.
Example: I have a file.csv. I upload it to HTMLDB_APPLICATION_FILES so it is stored there as a blob. Now I want copy data delimited by ';'(for example) to table in database.
Any ideas?
Best regards,
Tom -
Different log file name in the Control file of SQL Loader
Dear all,
I get every day 3 log files with ftp from a Solaris Server to a Windows 2000 Server machine. In this Windows machine, we have an Oracle Database 9.2. These log files are in the following format: in<date>.log i.e. in20070429.log.
I would like to load this log file's data to an Oracle table every day and I would like to use SQL Loader for this job.
The problem is that the log file name is different every day.
How can I give this variable log file name in the Control file, which is used for the SQL Loader?
file.ctl
LOAD DATA
INFILE 'D:\gbal\in<date>.log'
APPEND INTO TABLE CHAT_SL
FIELDS TERMINATED BY WHITESPACE
TRAILING NULLCOLS
(SL1 DATE "Mon DD, YYYY HH:MI:SS FF3AM",
SL2 char,
SL3 DATE "Mon DD, YYYY HH:MI:SS FF3AM",
SL4 char,
SL5 char,
SL6 char,
SL7 char,
SL8 char,
SL9 char,
SL10 char,
SL11 char,
SL12 char,
SL13 char,
SL14 char,
SL15 char)
Do you have any better idea about this issue?
I thought of renaming the log file to an instant name, such as in.log, but how can I distinguish the desired log file, from the other two?
Thank you very much in advance.
Giorgos BaliotisI don't have a direct solution for your problem.
However if you invoke the SQL loader from an Oracle stored procedure, it is possible to dynamically set control\log file.
# Grant previleges to the user to execute command prompt statements
BEGIN
dbms_java.grant_permission('bc4186ol','java.io.FilePermission','C:\windows\system32\cmd.exe','execute');
END;
* Procedure to execute Operating system commands using PL\SQL(Oracle script making use of Java packages
CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "Host" AS
import java.io.*;
public class Host {
public static void executeCommand(String command) {
try {
String[] finalCommand;
finalCommand = new String[4];
finalCommand[0] = "C:\\windows\\system32\\cmd.exe";
finalCommand[1] = "/y";
finalCommand[2] = "/c";
finalCommand[3] = command;
final Process pr = Runtime.getRuntime().exec(finalCommand);
new Thread(new Runnable() {
public void run() {
try {
BufferedReader br_in = new BufferedReader(new InputStreamReader(pr.getInputStream()));
String buff = null;
while ((buff = br_in.readLine()) != null) {
System.out.println("Process out :" + buff);
try {Thread.sleep(100); } catch(Exception e) {}
catch (IOException ioe) {
System.out.println("Exception caught printing process output.");
ioe.printStackTrace();
}).start();
new Thread(new Runnable() {
public void run() {
try {
BufferedReader br_err = new BufferedReader(new InputStreamReader(pr.getErrorStream()));
String buff = null;
while ((buff = br_err.readLine()) != null) {
System.out.println("Process err :" + buff);
try {Thread.sleep(100); } catch(Exception e) {}
catch (IOException ioe) {
System.out.println("Exception caught printing process error.");
ioe.printStackTrace();
}).start();
catch (Exception ex) {
System.out.println(ex.getLocalizedMessage());
public static boolean isWindows() {
if (System.getProperty("os.name").toLowerCase().indexOf("windows") != -1)
return true;
else
return false;
* Oracle wrapper to call the above procedure
CREATE OR REPLACE PROCEDURE Host_Command (p_command IN VARCHAR2)
AS LANGUAGE JAVA
NAME 'Host.executeCommand (java.lang.String)';
* Now invoke the procedure with an operating system command(Execyte SQL-loader)
* The execution of script would ensure the Prod mapping data file is loaded to PROD_5005_710_MAP table
* Change the control\log\discard\bad files as apropriate
BEGIN
Host_Command (p_command => 'sqlldr system/tiburon@orcl control=C:\anupama\emp_join'||1||'.ctl log=C:\anupama\ond_lists.log');
END;Does that help you?
Regards,
Bhagat -
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 -
Hi Experts,
i'm using SQL Loader for loading data from an XML file into the DB , my control file was some thing like that :
load data
infile 'D:data.xml' "str '</dataNode>'"
replace
into table MY_TABLE
where dataNode is the records' separator, this was working fine, what i'm trying to do now is writing all the parameters to a PARFILE , then passing only the PARFILE to the sql loader like the following :
sqlldr PARFILE=myParaFile.par
where myParaFile looks like that :
userid=xxx/xxx
control=xxx.ctl
log=xxx.log
data=D:\data.xml
the problem now that i have removed the INFILE clause from the control file , and i have put the "data" parameter insetad on the PARFILE , the question now is Where shall i write "str '</dataNode>'" to tell the SQL Loader that the input data is in stream format and use </dataNode> as records' separator
I really appreciate your help.My XML File:
<dataNode>
<ProductID>1</ProductID>
<Type>Phone</Type>
</dataNode>
<dataNode>
<ProductID>2</ProductID>
<Type>Sim</Type>
</dataNode>
My Control File :
load data
infile 'D:data.xml' "str '</dataNode>'"
replace
into table MY_TABLE
dummy filler terminated by "<dataNode>",
ProductID enclosed by "<ProductID>" and "</ProductID>",
Type enclosed by "<Type>" and "</Type>"
) -
SQL*Loader-128: Error in Concurrent program of type SQL* Loader
Hi,
Am facing below error with CP of SQL*Loader execution format. Both Control and data files are placed under bin directory under CUSTOM TOP.
CP doesnt have any parameter. I believe we dont need to pass login details to a CP. So how can we default the DB Login to SQL Loader in CP?
Appreciate your quick help.
SQL*Loader-128: unable to begin a session
ORA-01017: invalid username/password; logon denied
SQL*Loader: Release 10.1.0.5.0 - Production on Wed Dec 14 02:03:59 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL*Loader-128: unable to begin a session
ORA-01017: invalid username/password; logon denied
Program exited with status 1
Concurrent Manager encountered an error while running SQL*Loader for your concurrent request 1040692.
Review your concurrent request log file for more detailed information.
Here the Control and Data file for the same.
Control file:
LOAD DATA
INFILE 'XXX_Customer_Master.dat'
BADFILE 'Customer_bad.bad'
DISCARDFILE 'Customer_discard.bsc'
APPEND
INTO TABLE XXX_AR_CUSTOMERS_INT FIELDS TERMINATED BY "|" OPTIONALLY ENCLOSED BY '"'
ORIG_SYSTEM_PARENT_REF ,
ORIG_SYSTEM_CUSTOMER_REF,
CUSTOMER_NAME,
CUSTOMER_NAME_PHONETIC,
COUNTRY,
STATE,
CITY,
ADDRESS1,
POSTAL_CODE,
RECORD_NUMBER SEQUENCE(MAX, 1),
CREATED_BY CONSTANT -1,
CREATION_DATE CONSTANT SYSDATE,
CUSTOMER_TYPE CONSTANT 'R',
INSERT_UPDATE_FLAG CONSTANT 'I',
LAST_UPDATE_DATE CONSTANT SYSDATE,
LAST_UPDATE_LOGIN CONSTANT -1,
LAST_UPDATED_BY CONSTANT -1,
ORG_ID CONSTANT 102,
PRIMARY_SITE_USE_FLAG CONSTANT 'Y',
SITE_USE_CODE CONSTANT 'BILL_TO'
*Data file:*
'XXX_Customer_Master.dat'
50|792086|Test Customer |Test Customer |759843055|Australia|VIC|MELBOURNE|"Level 4 457 St Kilda Road"|3004
59|792232|Test Customer |Test Customer |751756404|Australia|ACT|Tuggeranong|PO Box 1035|2901Do we have to create soft link like we create for host program directory ?How to Register a Host Concurrent Program in Applications [ID 156636.1]
How To Create A Custom Concurrent Program With Host Method and Pass Parameters To The Shell Script [ID 266268.1]
How To Setup A Custom Concurrent Host Program [ID 147455.1]
Also, please see (How to Use 9i or 10g Features in SQL*Loader for Apps? [ID 423035.1]).
Thanks,
Hussein -
Has any one used SQL Loader for BLOB data? I would think you can only use it for text type data.
Thanks,
VicIf each blob is in a separate file, then you should be able to use LOBFILES to load them. Each row in the data file would need to have the name of the file containing the blob for that row. File ulcase9.ctl in the demo directory shows an example of using LOBFILES to load a lob column.
If you want the blob in the data file, then the data file needs to use types that have include length information in then, such as VARRAW, LONG VARRAW or VARRAWC. Also, the records for the data files cannot be terminated by a character string or newline. That's because the blob data might contain the character string or newline in the middle of its data. Instead, you would need to use the VAR record type. -
Sql Loader - Parallel Direct Path Loading
Hi,
I want to load a few million records into a table. I read from OTN site that we can make use of Parallel Direct Loading Option. As given in the site, I split my source file into two and tried loading the file from two different sqlldr sessions simultaniously. I used two seperate control files for each session. The sessions started first is getting completed successfully. But the session which started second is giving the following error.
Will anyone Pls help to sort out the problem.
Error
"SQL*Loader-951: Error calling once/load initialization
ORA-00604: error occurred at recursive SQL level 1
ORA-00054: resource busy and acquire with NOWAIT specified "
I'm using oracle 9.0.1.1.1.
The Options I tried with both the sessions are :
Direct=true parallel=true.
loading method is append.
Thanks in Advance,
TomI've got a similar problem.
I'm running Informatica which runs SQL*Loader via OCI.
With direct & parallel my Indexes give me ORA-26002 - quite understandable.
As its all wrapped up, I cannot say SKIP_INDEX_MAINTENANCE directly.
1) Is there a way to give SQL*Loader some Default-Parameters? I read something about a File shrept.lst but I cannot find a reference in the Oracle documentation.
Something useful down this road?
2) when I omit parallel, what am I losing? I load one file into one partition of one table. I read the SQL*Loader Documentation but didn't get the message of the 'Intrasegment Parallel Loading' Paragraph. Is this using parallel? Or is it just enabling to use parallel (if there will be a second SQL*Loader)? If its all about 'enabling' I can easily omit this - I know there won't be a second SQL*Loader for this partition.
regards,
Kathrin -
SQL Loader Control file help!!!
Hi All,
I was in the process of writing a control file for sql loader for an activity i am performing and would appreciate inputs from you all.
I have a table patient containing 44 columns, i have a column 'SEC_LANG_NAME' in which i have to insert data from a excel file.
The excel file contains 3 columns, PATIENT_ID, NAME,SEC_LANG_NAME, i just want to load the values present in 'SEC_LANG_NAME' column in excel file into the 'SEC_LANG_NAME' coulmn in the patient table using sqlloader and the condition is that PATIENT_ID in excel file should be equal to PATIENT_ID in the patient table.
as a first step i am converting this excel into a csv file, and then will shoot the sqlldr once i am done with control file, can someone please help me with the format of control file for this activity.
thanks in advance,
regards,
Edited by: user10243788 on Jan 3, 2010 12:09 AMHello user10243788.
It appears that your intent is to load data into an existing table that contains the key data and is only lacking a column of information. SQL*Loader itself is not built to do this; what it can do is load records to tables. You will have to use a two-step approach similar to what Srini has suggested. 1) If your process is able to be run local to the database server, an external table is a great option. If your process is instead run remote to the database server, SQL*Loader will allow you to load your data file to a table. 2) You will need to run a process to update the PATIENT table.
Here is a start of a control file based on the details that you've providedLOAD DATA
REPLACE
INTO patient_enhance
FIELDS TERMINATED BY ","
( patient_id
, name FILLER
, sec_lang_name)Hope this helps,
Luke
Please mark the answer as helpful or answered if it is so. If not, provide additional details.
Always try to provide create table and insert table statements to help the forum members help you better.
Edited by: Luke Mackey on Jan 5, 2010 12:30 PM
oops, will have to load patient_id to do the update
Maybe you are looking for
-
I have a PC that runs Windows XP, I can not down load any new up dates. It appears that an earlier copy of Bonjour is either MISSING from location or is damaged rendering it null. I have tried to download iTunes 10.7 and get stuck. I am so frustrated
-
Connect MBP to HDTV problem..
So I connected my MBP to HDTV through a MiniDisplayPort to DVI <-> DVI to HDMI cable, and all I can see is my MBP wallpaper on my HDTV. I haven't changed any options so I figure that's the problem, but I've been looking online and on my computer for
-
I own the Adobe Suite. How do I build a form?
I own the Adobe Suite already (including Acrobat) and I would like to build a form. Do I have to pay an additional fee to do this? If not, how do I create a form?
-
Unknown caller I'd with I phone6
I am having the same issues have spent numerous hours with Apple and AT & T trying to resolve. Is a huge issue as I am a caregiver for my parents. Their phone number as well as the doctors office show up as unknown. I hope a solution to this problem
-
I get an error message when i try to make a skype call to a landline
when i try to make a call to a phone from Skype i get an error message that says firefox does not know how to open this address ....