Huge Oracle table to File
Hi -
I have to create file out of huge oracle table (350 column ) Is there a way to create a file other than using IKM SQL to FILE APPEND.
-app
Hi,
You can use OdiSqlUnload to generate file out of table data .
Thanks,
Sutirtha
Similar Messages
-
Load from Oracle table to FIle
Hi,
I have a requirement where i need to load the data from a table to a file.
I need to convert all the columns into rows (Pvot and UnPivot) Does ODI support this. I have converted the columns to a single row using a procedure. i want to achive this using an interface. Say 1
2
3
4 is the column i need it to be 1,2,3,4.
What is the best way to achieve this?
Please give me some inputs for this.
Thanks in Advance,
KhaleelHi ,
You can refer Metalink Note 423694.1 for Pivoting using ODI.
Thanks,
Sutirtha -
Store Header and/or footer from flat file to an oracle table by customizing LKM.
I like to customize my LKM by adding extra option in LKM and extra step in LKM, so that I can store Header and Footer of the source File (Header : normally at beginning of the line Footer At the end of the line) in a separate oracle table.
File format would be
Header row
data
data
data
data
footer row
I like to store header row and footer row inside a table.
Please suggest how the LKM can be customized to do so.Answered at
Re: Uploading files to server -
How to load a huge data file (export from mysql) to an oracle table?
I have a data file which contains 1.3G bytes table data from mysql. It's format is csv.
How can i load these data to an oracle table in java way?
I thought about using sqlldr. But it requires a oracle client which may not be permitted in my environment.
If i generate "insert " statement and use batch update the batch update will stop if it comes across an exception when executing the insert one by one. I find no "insert ingore" statement in oracle like mysql.
Is there anyone can give me a solution with high performance? It's urgent and Thanks!hsy541 wrote:
I have a data file which contains 1.3G bytes table data from mysql. It's format is csv.
How can i load these data to an oracle table in java way?
Why must it be a Java way? The point is just to move the data.
I thought about using sqlldr. But it requires a oracle client which may not be permitted in my environment.
Why not just import the .csv file into Oracle? I'm sure there's a script or utility that will do it.
If i generate "insert " statement and use batch update the batch update will stop if it comes across an exception when executing the insert one by one. I find no "insert ingore" statement in oracle like mysql.
You want to turn off transactions? I'm not an Oracle expert, but I'd be shocked if there was something you could do in MySQL that didn't have an analog in Oracle. Find a better resource, like somebody that actually knows Oracle. Who set up that database for you? Consult with them.
Is there anyone can give me a solution with high performance? It's urgent and Thanks!Urgent to you....
% -
Load Huge data into oracle table
Hi,
I am using oracle 11g Express Edition, I have a file of .csv forma, Which has a data of size 500MB which needs to be uploaded into oracle table.
Please suggest which would be the best method to upload the data into table. Data is employee ticket history which is of huge data.
How to do the mass upload of data into oracle table need experts suggestion on this requirement.
Thanks
SudhirSudhir_Meru wrote:
Hi,
I am using oracle 11g Express Edition, I have a file of .csv forma, Which has a data of size 500MB which needs to be uploaded into oracle table.
Please suggest which would be the best method to upload the data into table. Data is employee ticket history which is of huge data.
How to do the mass upload of data into oracle table need experts suggestion on this requirement.
Thanks
SudhirOne method is to use SQL Loader (sqlldr)
Another method is to define an external table in Oracle which is allowing you to view your big file as a table in database.
You may want to have a look at this guide: Choosing the Right Export/Import Utility and this Managing External Tables.
Regards.
Al
Edited by: Alberto Faenza on Nov 6, 2012 10:24 AM -
Best way of partitioning the huge size table in oracle 11gr2
hi,
OS: linux
DB: oracle 11gR2
table size is about 2T and single table space with multiple dbf files in ASM,
table partition with dbms.redefinition is running past 2 days (range partition).. its running but not that fast..
note: exchange partition is too slow.. hence not used..
what is the best way of doing the huge size table partition. please suggest, thanks.>
what is the best way of doing the huge size table partition
>
A few questions
1. Is that an OLTP or OLAP table?
2. Is all of the data still needed online or is some of it archivable?
3. What type of partitiioning are you doing? RANGE? LIST? COMPOSITE?
4. Why do you you say 'exchange partition is too slow' - did you do a test?
For example if data will be partitioned by create date then one stragety is to initially put all existing data into the root partition of a range partitioned table. Then you can start using new partitions for new incoming data and take your time to partition the current data. -
Jython error while updating a oracle table based on file count
Hi,
i have jython procedure for counting counting records in a flat file
Here is the code(took from odiexperts) modified and am getting errors, somebody take a look and let me know what is the sql exception in this code
COMMAND on target: Jython
Command on source : Oracle --and specified the logical schema
Without connecting to the database using the jdbc connection i can see the output successfully, but i want to update the oracle table with count. any help is greatly appreciated
---------------------------------Error-----------------------------
org.apache.bsf.BSFException: exception from Jython:
Traceback (innermost last):
File "<string>", line 45, in ?
java.sql.SQLException: ORA-00936: missing expression
---------------------------------------Code--------------------------------------------------
import java.sql.Connection
import java.sql.Statement
import java.sql.DriverManager
import java.sql.ResultSet
import java.sql.ResultSetMetaData
import os
import string
import java.sql as sql
import java.lang as lang
import re
filesrc = open('c:\mm\xyz.csv','r')
first=filesrc.readline()
lines = 0
while first:
#get the no of lines in the file
lines += 1
first=filesrc.readline()
#print lines
## THE ABOVE PART OF THE PROGRAM IS TO COUNT THE NUMBER OF LINES
## AND STORE IT INTO THE VARIABLE `LINES `
def intWithCommas(x):
if type(x) not in [type(0), type(0L)]:
raise TypeError("Parameter must be an integer.")
if x < 0:
return '-' + intWithCommas(-x)
result = ''
while x >= 1000:
x, r = divmod(x, 1000)
result = ",%03d%s" % (r, result)
return "%d%s" % (x, result)
## THE ABOVE PROGRAM IS TO DISPLAY THE NUMBERS
sourceConnection = odiRef.getJDBCConnection("SRC")
sqlstring = sourceConnection.createStatement()
sqlstmt="update tab1 set tot_coll_amt = to_number( "#lines ") where load_audit_key=418507"
sqlstring.executeQuery(sqlstmt)
sourceConnection.close()
s0=' \n\nThe Number of Lines in the File are ->> '
s1=str(intWithCommas(lines))
s2=' \n\nand the First Line of the File is ->> '
filesrc.seek(0)
s3=str(filesrc.readline())
final=s0 + s1 + s2 + s3
filesrc.close()
raise finali changed as you adviced ankit
am getting the following error now
org.apache.bsf.BSFException: exception from Jython:
Traceback (innermost last):
File "<string>", line 37, in ?
java.sql.SQLException: ORA-00911: invalid character
here is the modified code
sourceConnection = odiRef.getJDBCConnection("SRC")
sqlstring = sourceConnection.createStatement()
sqlstmt="update tab1 set tot_coll_amt = to_number('#lines') where load_audit_key=418507;"
result=sqlstring.executeUpdate(sqlstmt)
sourceConnection.close()
Any ideas
Edited by: Sunny on Dec 3, 2010 1:04 PM -
Hello friends,
Can you please help me with the following requirements?
I have a xml structure like this
<?xml version="1.0"?>
<data>
<var name="document">
<string>Sales Order</String>
</var>
<var name="results">
<recordset rowcount="2">
<field name="sales_num">
<string>12345</string>
<string>A0192</string>
</field>
<field name="ord_qty">
<string>10</string>
<string>50</string>
</field>
</recordset>
</var>
</data>
I have to read this xml file and copy the data to the Oracle table
Sales Table
CREATE TABLE SALES
SALES_NUM VARCHAR2(20 BYTE),
ORD_QTY NUMBER(4)
Expected Result
x. Sales Num Ord Qty
1. 12345 10
2. A0192 50
I tried to follow the approach provided in this link http://www.oracle-base.com/articles/9i/ParseXMLDocuments9i.php . But it doesn't work with the XML structure I have.
Thanks,
Maheshplease let me know the solution as well. i need this
-
Upload data from excel file to Oracle table
Dear All,
I have to upload data from excel file to Oracle table without using third party tools and without converting into CSV file.
Could you tell me please how can i do this using PLSQl or SQL Loader.
Thnaks in Advance..Dear All,
I have to upload data from excel file to
Oracle table without using third party tools and
without converting into CSV file.
Could you tell me please how can i do this
using PLSQl or SQL Loader.
Thnaks in Advance..As billy mentioned using ODBC interface ,the same HS service which is a layer over using traditional ODBC to access non oracle database.Here is link you can hit and trial and come out here if you have any problem.
http://www.oracle-base.com/articles/9i/HSGenericConnectivity9i.php[pre]
Khurram -
How to load date and time from text file to oracle table through sqlloader
hi friends
i need you to show me what i miss to load date and time from text file to oracle table through sqlloader
this is my data in this path (c:\external\my_data.txt)
7369,SMITH,17-NOV-81,09:14:04,CLERK,20
7499,ALLEN,01-MAY-81,17:06:08,SALESMAN,30
7521,WARD,09-JUN-81,17:06:30,SALESMAN,30
7566,JONES,02-APR-81,09:24:10,MANAGER,20
7654,MARTIN,28-SEP-81,17:24:10,SALESMAN,30my table in database emp2
create table emp2 (empno number,
ename varchar2(20),
hiredate date,
etime date,
ejob varchar2(20),
deptno number);the control file code in this path (c:\external\ctrl.ctl)
load data
infile 'C:\external\my_data.txt'
into table emp2
fields terminated by ','
(empno, ename, hiredate, etime, ejob, deptno)this is the error :
C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Commit point reached - logical record count 5
C:\>any help i greatly appreciated
thanks
Edited by: user10947262 on May 31, 2010 9:47 AMload data
infile 'C:\external\my_data.txt'
into table emp2
fields terminated by ','
(empno, ename, hiredate, etime, ejob, deptno)Try
load data
infile 'C:\external\my_data.txt'
into table emp2
fields terminated by ','
(empno, ename, hiredate, etime "to_date(:etime,'hh24:mi:ss')", ejob, deptno)
this is the error :
C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Commit point reached - logical record count 5
C:\>
That's not an error, you can see errors within log and bad files. -
Loading data from .csv file into Oracle Table
Hi,
I have a requirement where I need to populate data from .csv file into oracle table.
Is there any mechanism so that i can follow the same?
Any help will be fruitful.
Thanks and regardsYou can use Sql Loader or External tables for your requirement
Missed Karthick's post ...alredy there :)
Edited by: Rajneesh Kumar on Dec 4, 2008 10:54 AM -
Uploading data from a xlsx file into an Oracle table
Hi All,
I want to know what would be the best approach and tool to upload the data from an xlsx (excel) sheet into an Oracle table.
Can I use 'sqlldr'?
~ParagParag Kalra wrote:
What if the excel sheet is exported from some other third party database and not explicitly generated on Windows? I know if we can export it to excel why can't we also export it to csv but what if that option is also not available.
Also what things do I need to take into account when I export a xlsx file to csv file. I mean I hope in no circumstances there would be a data loss.How about instead of of these "what ifs" and "I hopes" you tell us exactly what you have to work with and describe the real business problem. If you ask the wrong questions, you get the wrong answers.
You "hope" that there would be no data loss? Do you really think Excel would survive as a product, much less be the overwhelming dominant product of its type, if it screwed up something that fundamental? The only thing that will be lost is the formatting meta-data. -
How to export data from a Oracle table to a delimited file?
I know how to load delimited file into a table, but how to export
data from a Oracle table to a delimited file?
Thanks in advance.Try looking at this link, it's long but there's three different solutions discussed in it. If you look at Barbara Boehmer's
solution in her posts in the link below you'll see that she's addressed your concerns with spool files.
Re: utl_smtp and triggers -
How to load the data from .csv file to oracle table???
Hi,
I am using oracle 10g , plsql developer. Can anyone help me in how to load the data from .csv file to oracle table. The table is already created with the required columns. The .csv file is having about 10lakh records. Is it possible to load 10lakh records. can any one please tell me how to proceed.
Thanks in advance981145 wrote:
Can you tell more about sql * loader??? how to know that utility is available for me or not??? I am using oracle 10g database and plsql developer???SQL*Loader is part of the Oracle client. If you have a developer installation you should normally have it on your client.
the command is
sqlldrType it and see if you have it installed.
Have a look also at the FAQ link posted by Marwin.
There are plenty of examples also on the web.
Regards.
Al -
XML data into Oracle Tables. XML file on Application Server.Oracle Apps R12
Hi All,
My Database version : 11.2.0.2.0
I have an XML file which needs to be loaded into the Database Tables. How ever i do not want to use the XMLTYPE as given below
insert into test1 (
SELECT PrcDate, PmtType, PmtStatus, PmtTypeCount, PmtTypeAmt
FROM XMLTABLE(
'/WFPaymentAck/RejectedDom1ACH'
PASSING XMLTYPE( BFILENAME('ECX_UTL_LOG_DIR_OBJ','wf_test_xml.XML'), NLS_CHARSET_ID('UTF8') )
COLUMNS
PrcDate VARCHAR2(2000) PATH '@PrcDate' ,
PmtType VARCHAR2(2000) PATH '@PmtType' ,
PmtStatus VARCHAR2(100) PATH '@PmtStatus' ,
PmtTypeCount VARCHAR2(100) PATH 'PmtTypeCount' ,
PmtTypeAmt VARCHAR2(100) PATH 'PmtTypeAmt'
Because this way the XML file needs to reside on the DB server.
I am looking into other option of loading the XML file into a CLOB column of a table and reading it from that column.
I did a couple of tests and feel that this way also the XML file has to reside on the Database Server itself. I am not sure if this is correct or if there is any problem with our TEST instance.
++Can anyone let me know if i need to have the XML file on the DB server instead of the Application server to load into a CLOB column of table ??++
++Or++
++Is there any other workaround for me to load XML into Oracle Tables, while having the XML file on Application Server.++
Your immediate help is appreciated. I need to get past this ASAP.
Thanks in Advance.
VJ1) Are you asking me to create a folder on Database directory which points to a folder on the Apps server ?I suggest creating an Oracle directory object (a database object) pointing to a real location (folder) on Application server.
we DONOT want a hand shake between the DB Server and the APPS server.I don't see where the problem is.
I'm not familiar with Apps R12 but there's no doubt the two servers are already communicating, at least App server should be able to access the DB for the whole thing to run.
As I said :
One way or another, the data has to make its way to the database, there's no workaround to that.How do you imagine the data will end up in a database table if it doesn't come to the DB server?
There's no magical method out there, both servers have to communicate at some point.
About client-server approaches (client being here the App server), you can read about accessing the XML DB repository in the XML DB Developer's Guide : http://download.oracle.com/docs/cd/E11882_01/appdev.112/e23094/toc.htm
Other option : SQL*Loader can load a CLOB, or an XMLType column too
Edited by: odie_63 on 19 déc. 2011 20:22
Maybe you are looking for
-
Itunes AGAIN downloading many of my purchases for no apparent reason
Hi I just downloaded a single episode of a show from itunes and, within minutes, many already purchased tv show episodes and songs started downloading duplicates. I have had to pause these duplicate downloads as I am worried I will have to automatica
-
Timer expired and something unexpected occured
Hi all, There is a timer in my forms , and there is the when-timer-expired form-level trigger. The problem is that : 1) when I type something in a text item , then when the timer expires all the content of the text item are selected and is cleared if
-
HT1349 dropped phone in water. How do i open phone to dry out
How do I dry out my iphone?
-
Cannot open one of my spreadsheets
Hi everyone, One of my spreadsheets is "trying" to update its data to iCloud since yesterday. It's stuck. I cannot open, duplicate, delete, or send via email this spreadsheet. It's icon is fafed, not as bright as all the other (same type) of spreadsh
-
(Numbers '09, 2.1 (436)) I have an 8000+ row table of names and addresses that I tried sorting by street address. When I did an ascending sort on that column, the rows with blank street addresses were split between the top and bottom of the sort. T