Load Data from SQL Server to Oracle 10g using Sql*loader utility
I am trying to lod data from sql server 2005 to oracle 10g.
What is the best way to do it?
Can sql*loader utility do it?
what is the difference of using sql*loader utility and migration tool fom sql developer ?
Thanks
Edited by: user11313758 on Sep 30, 2009 4:30 PM
Hello:
You could consider using Oracle Heterogeneous Services to do this. If your Oracle database is on a Windows platform the link below shows you how to make a connection to SqlServer from an Oracle database.
http://www.databasejournal.com/features/oracle/article.php/3442661/Making-a-Connection-from-Oracle-to-SQL-Server.htm
Varad
Similar Messages
-
Load data from FTP server into Oracle
I have a zipped file in a FTP server. I need to unzip the file and sql load it into an Oracle table.
Does Oracle has any utilities with which I can direct do "get" from the FTP server?
Does Oracle has any zip/unzip features?
I am using 10g.user6794035 wrote:
I have a zipped file in a FTP server. I need to unzip the file and sql load it into an Oracle table.
Does Oracle has any utilities with which I can direct do "get" from the FTP server?
Does Oracle has any zip/unzip features?
I am using 10g.Oracle does not support thes features directly. You'll have to write an OS script to performthe tasks and insert the data.
Dependending on your output format you can use UTL_FILE, SQL*LOADER, or external tables to load the data. -
SQL loaded not loading data from csv format to oracle table.
Hi,
I trying to load data from flat files to oracle table,it not loading decimal values.Only character type of data is loaded and number format is null.
CONTROL FILE:
LOAD DATA
INFILE cost.csv
BADFILE consolidate.bad
DISCARDFILE Sybase_inventory.dis
INSERT
INTO TABLE FIT_UNIX_NT_SERVER_COSTS
FIELDS TERMINATED BY ',' optionally enclosed by '"'
TRAILING NULLCOLS
HOST_NM,
SERVICE_9071_DOLLAR FLOAT,
SERVICE_9310_DOLLAR FLOAT,
SERVICE_9700_DOLLAR FLOAT,
SERVICE_9701_DOLLAR FLOAT,
SERVICE_9710_DOLLAR FLOAT,
SERVICE_9711_DOLLAR FLOAT,
SERVICE_9712_DOLLAR FLOAT,
SERVICE_9713_DOLLAR FLOAT,
SERVICE_9720_DOLLAR FLOAT,
SERVICE_9721_DOLLAR FLOAT,
SERVICE_9730_DOLLAR FLOAT,
SERVICE_9731_DOLLAR FLOAT,
SERVICE_9750_DOLLAR FLOAT,
SERVICE_9751_DOLLAR FLOAT,
GRAND_TOTAL FLOAT
In table FLOAT are replaced by number(20,20)
SAmple i/p from csv:
ABOS12,122.46,,1315.00,,1400.00,,,,,,,,1855.62,,4693.07
Only abos12 is loaded and rest of the number are not loaded.
Thanks.Hi,
Thanks for your reply.
Its throwing error.
Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array: 64 rows, maximum of 256000 bytes
Continuation: none specified
Path used: Conventional
Table FIT_UNIX_NT_SERVER_COSTS, loaded from every logical record.
Insert option in effect for this table: INSERT
TRAILING NULLCOLS option in effect
Column Name Position Len Term Encl Datatype
HOST_NM FIRST 255 , O(") CHARACTER
SERVICE_9071_DOLLAR NEXT 255 , O(") CHARACTER
SERVICE_9310_DOLLAR NEXT 255 , O(") CHARACTER
SERVICE_9700_DOLLAR NEXT 255 , O(") CHARACTER
SERVICE_9701_DOLLAR NEXT 255 , O(") CHARACTER
SERVICE_9710_DOLLAR NEXT 255 , O(") CHARACTER
SERVICE_9711_DOLLAR NEXT 255 , O(") CHARACTER
SERVICE_9712_DOLLAR NEXT 255 , O(") CHARACTER
SERVICE_9713_DOLLAR NEXT 255 , O(") CHARACTER
SERVICE_9720_DOLLAR NEXT 255 , O(") CHARACTER
SERVICE_9721_DOLLAR NEXT 255 , O(") CHARACTER
SERVICE_9730_DOLLAR NEXT 255 , O(") CHARACTER
SERVICE_9731_DOLLAR NEXT 255 , O(") CHARACTER
SERVICE_9750_DOLLAR NEXT 255 , O(") CHARACTER
SERVICE_9751_DOLLAR NEXT 255 , O(") CHARACTER
GRAND_TOTAL NEXT 255 , O(") CHARACTER
value used for ROWS parameter changed from 64 to 62
Record 1: Rejected - Error on table FIT_UNIX_NT_SERVER_COSTS, column GRAND_TOTAL.
ORA-01722: invalid number
Record 2: Rejected - Error on table FIT_UNIX_NT_SERVER_COSTS, column GRAND_TOTAL.
ORA-01722: invalid number
Record 3: Rejected - Error on table FIT_UNIX_NT_SERVER_COSTS, column GRAND_TOTAL.
ORA-01722: invalid number
Record 4: Rejected - Error on table FIT_UNIX_NT_SERVER_COSTS, column GRAND_TOTAL.
ORA-01722: invalid number
Record 5: Rejected - Error on table FIT_UNIX_NT_SERVER_COSTS, column GRAND_TOTAL.
ORA-01722: invalid number
Record 6: Rejected - Error on table FIT_UNIX_NT_SERVER_COSTS, column GRAND_TOTAL.
ORA-01722: invalid number
Record 7: Rejected - Error on table FIT_UNIX_NT_SERVER_COSTS, column GRAND_TOTAL.
ORA-01722: invalid number
Record 8: Rejected - Error on table FIT_UNIX_NT_SERVER_COSTS, column GRAND_TOTAL.
ORA-01722: invalid number
Record 9: Rejected - Error on table FIT_UNIX_NT_SERVER_COSTS, column GRAND_TOTAL.
ORA-01722: invalid number
Record 10: Rejected - Error on table FIT_UNIX_NT_SERVER_COSTS, column GRAND_TOTAL.
ORA-01722: invalid number
Record 11: Rejected - Error on table FIT_UNIX_NT_SERVER_COSTS, column GRAND_TOTAL.
ORA-01722: invalid number
Please help me on it.
Thanks, -
Migrate Data action hanging migrating from sql server to Oracle 10g
Hi,
I am currently migrating a SQL Server 2005 db to Oracle 10g using SQL Developer 1.2.1. I have created the migration repository, captured the SQL Server db objects, and created the target schema. There are about 109 tables captured. During Data migration, however, the data move hangs. I have run the data move a couple of times now and it does not hang while migrating any particular table, but seems to be more to do with the length of time it is taking to migrate. Could this be an issue with SQL Server connections being lost? The SQL Server db is quite large. Row counts of 100k plus.
Message was edited by:
user596259Probably. There is an offline option for migrating data under the migration menu. Generate Scripts for the data move using the appropriate converted model and u can export the data to bcp export files and load it with teh generated SQL Loader scripts.
-
Migration from MS SQL Server to Oracle 10g
Hi,
In our application, we are planning to refresh data every one hour from MS SQL Server to Oracle 10g. Can anyone tell me what approach can be followed?
Thanks & Regards,
Faizal MKHello,
migrations can be done with the Migration Workbench that is included in the SQL Developer: http://www.oracle.com/technology/tech/migration//workbench/index_sqldev_omwb.html
But your question sounds more like a replication of data than a migration. Please read as a starter the following note in My Oracle Support (former Metalink):
Note 283700.1: How to replicate Data between Oracle and a Foreign Datasource
That note describes ways for the replication in both directions. Please let me know whether this is helpful for you.
Best regards
Wolfgang Kobarg-Sachsse -
Error while loading data from application server
Hi all,
Am facing a problem while loading data from application server.
The error i get is ....
*" The argument ' Rental/Lease ' cannot be interpreted as a number while assigning character to application structure*.
'Rental/Lease' is a value for a character infoobject length 30. I checked for the sequence of fields in data source and the sequnce of values am receiving in application server and the sequence match.
when i copy these values into a CSV onto a desktop and load,load is successful.
Please let me know your views.
Thanks&Regards,
PraveenIt looks like the system is trying to convert Rental/Lease to a number format. Is the info object type CHAR or NUMC or ??? I would look there.
Also, make sure / is in RSKC.
Brian -
How to insert data from *.dmp file to oracle 11g using Oracle SQL Develope
hi
i backup my database using PL/SQL developer and made *.dmp file
how to insert data from *.dmp file to oracle 11g using Oracle SQL Developer 2.1.1.64
and how to make *.dmp file from sql*plus ?
thanks in advancePl/Sql developer has a config window, there you choose the exec to do the import/export.
Find it and his home version, it may be exp or expdp, the home version is the version of the client where the exp executable is.
Then use the same version of imp or impdp to execute the import, you do not need to use Oracle SQL Developer 2.1.1.64. If you want to use it, you must have the same version in the oracle home that exp/imp of sql developer use. -
Faster way to migrate data from SQL Server to Oracle 10g
We have to migrate data from SQL Server to Oracle 10 g.
One particular table on SQL Server has records around 1.25 millions.
We tried moving data using DTS package, but looks it will take hours with current speed of 300 records/minute.
This table has TEXT column, which has XML strings stored. I am not sure, if this is the reason for slow migration.
Would you please suggest better options to migrate it faster?
Thanks in advance !!!Have you tried Migration work bench?
-
One way replication from MS sql server to Oracle 10g
Hi,
We are using Sql server 2005 windows 2003 32 bit and Oracle 10g 10.2.0.3 on linux 64 bit
Is it possible to replcate table data on real time from sql server (2005 32 bit or sql server 2000 32 bit)to oracle 10g running on linux 64 bit?
If yes then what are the steps.
It will be one way replication from sql server to oracle.
Which option is best sql server dts or Oracle Stream replication to replicate table data?
Regards,If you want to push data from SqlServer, then ODBC, Linked tables, DTS etc.
If you want to pull data from Oracle, then Heterogenous Services / Gateway. -
Migration from SQL server to Oracle 10g
Hi, I am new here,
I would like to ask how to use SQL developer MWB to migration SQL Server to Oracle?
I have go through the doc(s) like: getting start, user's guild, etc. and have following problems
(1), where should the SQL developer installed? in SQL Server side? Oracle side? or any PC with connection to the databases?
(2), do I need to get some plug-in(s) for MWB to work? If yes, which plug-in do I need and where are they?
Thank you very much.Hi Chocobo,
I put together a Quick Guide myself
http://dermotoneill.blogspot.com/2008/06/sql-developer-migration-workbench-151_11.html
I updated it to answer your questions.
Hope that helps
Dermot. -
Migration data from SAP DB2 to Oracle 10g
Hi , I am assigned to migrate data from SAP system which is using DB2 to Oracle 10g.I not very familiar with SAP. I hope someone can help me., especially for those familiar in SAP.
Please help me.
thanks
jebatcoHello,
just migrating a DB2 database to Oracle 10g might be an easy task. The Oracle Migration Workbench is the tool for such a migration:
http://www.oracle.com/technology/tech/migration/workbench/index.html
I have no idea about SAP, and that might complicate the picture. But there exist specialists for this task:
Oracle Expertise in the SAP environment
The Solution Center SAP Support and Service – located in Walldorf – offers SAP
customers the following services:
• Advanced Customer Services (ACS)
• Performance Analysis and Tuning
• Development of concepts for Backup/Restore/Recovery, and High Availability,
Administration
• Security concepts
• Optimizing of ABAP/4 programs (performance improvement)
• Migration service for customers, who want to use Oracle as the database for SAP
applications (from Informix, MaxDB, DB2, or SQL Server to Oracle).
• Migration services from “Oracle to Oracle” (e.g. Tru64 to HP_UX)
• Integration-Products and –Services
• Oracle Database: The Database of Choice for Deploying SAP Solutions
This is taken from http://www.oracle.com/newsletters/sap/docs/ora4sap-db-of-choice.090213.pdf
Best regards
Wolfgang -
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 -
Error while loading data from flat file to Oracle DB
I am new to ODI. I am trying to load data from a flat file to Oracle DB using the LKM File to Oracle (External Table) and using the IKM Oracle Incremental Update. I am getting the following exception during the "Create External Table" stage:
org.apache.bsf.BSFException: exception from Jython:
Traceback (most recent call last):
File "<string>", line 44, in <module>
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:202)
at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1110)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1488)
at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:2251)
at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:2192)
at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:347)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
java.sql.SQLException: java.sql.SQLException: ORA-30088: datetime/interval precision is out of range
at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:322)
at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:170)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2473)
at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:48)
at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:1)
at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:561)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:83)
at java.lang.Thread.run(Thread.java:662)
Caused by: Traceback (most recent call last):
File "<string>", line 44, in <module>
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:202)
at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1110)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1488)
at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:2251)
at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:2192)
at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:347)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
java.sql.SQLException: java.sql.SQLException: ORA-30088: datetime/interval precision is out of range
at org.python.core.PyException.fillInStackTrace(PyException.java:70)
at java.lang.Throwable.<init>(Throwable.java:181)
at java.lang.Exception.<init>(Exception.java:29)
at java.lang.RuntimeException.<init>(RuntimeException.java:32)
at org.python.core.PyException.<init>(PyException.java:46)
at org.python.core.PyException.<init>(PyException.java:43)
at org.python.core.Py.JavaError(Py.java:455)
at org.python.core.Py.JavaError(Py.java:448)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:177)
at org.python.core.PyObject.__call__(PyObject.java:355)
at org.python.core.PyMethod.__call__(PyMethod.java:215)
at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:221)
at org.python.core.PyMethod.__call__(PyMethod.java:206)
at org.python.core.PyObject.__call__(PyObject.java:397)
at org.python.core.PyObject.__call__(PyObject.java:401)
at org.python.pycode._pyx1.f$0(<string>:50)
at org.python.pycode._pyx1.call_function(<string>)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1204)
at org.python.core.Py.exec(Py.java:1248)
at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:172)
at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:144)
at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:322)
at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:170)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2472)
at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:47)
at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:1)
at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
... 1 more
Caused by: java.sql.SQLException: ORA-30088: datetime/interval precision is out of range
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:202)
at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1110)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1488)
at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:2251)
at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:2192)
at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:347)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:175)
... 33 more
Could anyone please provide any pointers.
Thanks,
Srini.The code that is executed is as follows:
createTblCmd = r"""
create table ODITEMP.C$_0PARTNER
C1_C1 NUMBER(14),
C2_C2 VARCHAR2(12),
C3_C3 VARCHAR2(18),
C4_C4 NUMBER(7),
C5_C5 TIMESTAMP(11)
ORGANIZATION EXTERNAL
TYPE ORACLE_LOADER
DEFAULT DIRECTORY dat_dir
ACCESS PARAMETERS
RECORDS DELIMITED BY 0x'0D0A'
CHARACTERSET 'WE8ISO8859P1'
STRING SIZES ARE IN CHARACTERS
BADFILE 'partners.txt_%a.bad'
LOGFILE 'partners.txt_%a.log'
DISCARDFILE 'partners.txt_%a.dsc'
SKIP 0
FIELDS
MISSING FIELD VALUES ARE NULL
C1_C1 POSITION(1:14) ,
C2_C2 POSITION(15:26) ,
C3_C3 POSITION(27:44) ,
C4_C4 POSITION(45:51) ,
C5_C5 POSITION(52:62)
LOCATION ('partners.txt')
PARALLEL
REJECT LIMIT UNLIMITED
# Create the statement
myStmt = myCon.createStatement()
# Execute the trigger creation
myStmt.execute(createTblCmd)
myStmt.close()
myStmt = None
# Commit, just in case
myCon.commit() -
Load data from xml file in oracle data base
Hi all,
I'd like to know if is posible to load data from a file xml into a table of oracle data base through SQL*LOADER, loaded only in a normal column no with type XMLType , for example
I have a xml file
<person name="kate" surname="fari" city="new york" >
<son name="faus" age="18"/>
<son name="doly" age="10"/>
</person>
and I load in table :
table :person
column
name surname city
kate fari new york
table : son
name age
doly 10
faus 18
thank you for your return !!!!!!!!!
Ninova
Edited by: user10474037 on 30 mai 2011 08:47
Edited by: user10474037 on 30 mai 2011 08:48
Edited by: user10474037 on 30 mai 2011 08:48
Edited by: user10474037 on 30 mai 2011 08:49
Edited by: user10474037 on 30 mai 2011 08:50Hi
This May be found at
SQL Loader to upload XML file -
Couldn't copy large amount of data from enterprise DB to Oracle 10g
Hi,
I am using i-batis to copy data from enterprise DB to oracle and viceversa.
The datatype of a field on EDB is 'text' and the datatype on oracle is 'SYS.XMLTYPE'
i am binding these to a java string property in a POJO to bind values.
I could successfully copy limited amount of data from EDB to oracle but if there is more data, i am getting the following exceptions with different oracle drivers ( but i could read large amount of data from EDB):
--- Cause: java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:457)
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.update(SqlMapSessionImpl.java:90)
at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.update(SqlMapClientImpl.java:66)
at com.aqa.pojos.OstBtlData.updateOracleFromEdbBtlWebservice(OstBtlData.java:282)
at com.aqa.pojos.OstBtlData.searchEdbAndUpdateOracleBtlWebservice(OstBtlData.java:258)
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/aqa/sqlmaps/SQLMaps_OSTBTL_Oracle.xml.
--- The error occurred while applying a parameter map.
--- Check the updateOracleFromEDB-InlineParameterMap.
--- Check the parameter mapping for the 'btlxml' property.
--- Cause: java.sql.SQLException: setString can only process strings of less than 32766 chararacters
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeUpdate(MappedStatement.java:107)
at com.iba
I have latest oracle 10g jdbc drivers.
remember, i could copy any amount of data from oracle to EDB but not otherway around.
PLease let me know if you have come across this issue, any recommendation is very much appreciated.
Thanks,
CK.Hi,
I finally remembered how I solved this issue previously.
The jdbc driver isn't able to directly call the insert with a column xml_type. The solution I was using was to build a wrapper function in plSQL.
Here it is (for insert but I suppose tha update will be the same)
create or replace procedure insertXML(file_no_in in number, program_no_in in varchar2, ost_XML_in in clob, btl_XML_in in clob) is
begin
insert into AQAOST_FILES (file_no,program_no,ost_xml,btl_xml) values(file_no_in, program_no_in, xmltype(ost_XML_in), xmltype(btl_XML_in));
end insertXML;
here is the sqlmap file I used
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMap
PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap>
<typeAlias alias="AqAost" type="com.sg2net.jdbc.AqAost" />
<insert id="insert" parameterClass="AqAost">
begin
insertxml(#fileNo#,#programNo#,#ostXML:CLOB#,#bltXML:CLOB#);
end;
</insert>
</sqlMap>
an here is a simple program
package com.sg2net.jdbc;
import java.io.IOException;
import java.io.Reader;
import java.io.StringWriter;
import java.sql.Connection;
import oracle.jdbc.pool.OracleDataSource;
import com.ibatis.common.resources.Resources;
import com.ibatis.sqlmap.client.SqlMapClient;
import com.ibatis.sqlmap.client.SqlMapClientBuilder;
public class TestInsertXMLType {
* @param args
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
String resource="sql-map-config-xmlt.xml";
Reader reader= Resources.getResourceAsReader(resource);
SqlMapClient sqlMap = SqlMapClientBuilder.buildSqlMapClient(reader);
OracleDataSource dataSource= new OracleDataSource();
dataSource.setUser("test");
dataSource.setPassword("test");
dataSource.setURL("jdbc:oracle:thin:@localhost:1521:orcl");
Connection connection=dataSource.getConnection();
sqlMap.setUserConnection(connection);
AqAost aqAost= new AqAost();
aqAost.setFileNo(3);
aqAost.setProgramNo("prg");
Reader ostXMLReader= Resources.getResourceAsReader("ostXML.xml");
Reader bltXMLReader= Resources.getResourceAsReader("bstXML.xml");
aqAost.setOstXML(readerToString(ostXMLReader));
aqAost.setBltXML(readerToString(bltXMLReader));
sqlMap.insert("insert", aqAost);
connection.commit();
public static String readerToString(Reader reader) {
StringWriter writer = new StringWriter();
char[] buffer = new char[2048];
int charsRead = 0;
try {
while ((charsRead = reader.read(buffer)) > 0) {
writer.write(buffer, 0, charsRead);
} catch (IOException ioe) {
throw new RuntimeException("error while converting reader to String", ioe);
return writer.toString();
package com.sg2net.jdbc;
public class AqAost {
private long fileNo;
private String programNo;
private String ostXML;
private String bltXML;
public long getFileNo() {
return fileNo;
public void setFileNo(long fileNo) {
this.fileNo = fileNo;
public String getProgramNo() {
return programNo;
public void setProgramNo(String programNo) {
this.programNo = programNo;
public String getOstXML() {
return ostXML;
public void setOstXML(String ostXML) {
this.ostXML = ostXML;
public String getBltXML() {
return bltXML;
public void setBltXML(String bltXML) {
this.bltXML = bltXML;
I tested the insert and it works correctly
ciao,
Giovanni
Maybe you are looking for
-
Error Executing Database Query
I have a web application written in CF8 with Oracle 11g as the back end. This application has been used very often for more than 6 years. Currently I am moving to CF10 and did only a little modification to the CF codes. When I ran the new application
-
Disc Utility for Parallels Prep and Memory Issue
I'm having no luck with starting threads on the Parallel's forum so here I go: A question about configuring. I'm going to be installing Parallels 3.0 and have a Power Pro with two 500 GB internal drives. My Mac Apps and OSX are on one drive with the
-
OraOLEDB 9.2.0.4.0 production release is available
OraOLEDB 9.2.0.4.0 production release is available for download from OTN. Broken download link issue has been fixed. What's new in this release? =========================== New Data Types Support Oracle9i and later versions data types: - TIMESTAMP -
-
Printer not installed error when using reports server
Im using three NTYRE architecture when i have to run my application on 128kbps leazed line network across 30 units,requirement is to generate text output at the client side for printing some report formats in character mode. im trying to generate a t
-
What benefits does the new CMM bring to the table??
After installing the new Colour Management Module, I now have the new option of 'Adobe CMM' as well as the old 'Adobe ACE' and 'Microsoft ICM' in Photoshop CS3 and other Adobe applications. What benefits does the new CMM bring to the table?? As it is