Read data from Oracle , not all data brought over
I have a strange problem when read data from Oracle and save to SQL Server.
For example , there are 20k rows of data in Oracle , I created SSIS data flow, and data saved in SQL Server , Everything looks fine. But late you will find only first 16k rows of data in SQL Server , the rest is simple missng. no error or any waring.
I am using OLE DB .
Great appreciate for any help.
Ray
Thanks. I think that UseSessionFormat=true
helped me fixed this kind of issue in my other project.
I actually found out this issue for this case I was asking. I am actually not missing data. It was a data type issue. A column was using a wrong datatype, so when I run a query and didn't get result I supposed.
Similar Messages
-
What is the easiest way to export all tables data from Oracle to MS SQL Server?
Hello MS,
I would like to export all tables from Oracle 11.2 to MS SQL Server 2012 R1.
Using the tool "Microsoft SQL Server Migration Assistant v6.0 for Oracle" did not work for me because there are too many warnings and errors regarding the schema creation (MS cannot know it because they are not the schema designer). My idea is
to leave/skip the schema creation to the application designer/supplier and instead concentrate on the Oracle data export and MS SQL data import.
What is the easiest way to export all tables data from Oracle to MS SQL Server quickly?
Is it:
- the „MS SQL Import and Export Data“ Tool
- the “MS SQL Integration Services” Tool
- not Oracle dump *.dmp format because it is a propritery binary format
- flat file *.csv (delimited format)
Thanks!Hi lingodingo,
If you want to directly export all tables from Oracle database to SQL Server, I suggest you use SQL Server Import and Export Wizard. Because you just need to follow the wizard with GUI, this is the easiest way.
If you want to make some modification for the tables‘ data before loading to SQL Server, I suggest you use SQL Server Integration Services package. For more details, please refer to the following similar thread:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/38b2bed2-9d4e-48d4-a33f-1d9eed1c062d/flat-file-to-sql-server?forum=sqldatamining
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
I recently updated my iphone5 with iOS 7.0.3 but while updating it was reformatted. I tried to recover my apps and photos from iCloud but not all datas were recovered. I am sure that I was able to back up my phone regularly. Only new photos were recovered the older ones which were the first ones that I backed up cant be found. Can I still recover those datas?
Restoring the backup should recover the photos that were in the camera roll at the time of the backup. If that didn't happen, all you can do is try restoring the backup again. You might try some of the tips mentioned in this discussion thread that other's found useful when they had a similar problem, such as the one by ezjules: https://discussions.apple.com/message/19518589#19518589.
-
I can not count the data from the module. Can prompt as it to make. It is desirable with examples (data read-out from the module and data transmission between channels. It is in advance grateful.
Hello. Most of the engineers in developer exchange are more familiar
with NI products. Contacting ICS for technical support is a better
course of action. -
Which LKM is to be used for data from oracle to file
Hi All
I am new to ODI. Please help me in understanding this tool.
I want to know Which LKM is to be used for moving data from oracle to a comma seperated file etc.Hi John
Thanks a ton... I was able to move ahead. I executed thinking all params are correct.
But it did not go thru and gave me this error:-
936 : 42000 : java.sql.SQLException: ORA-00936: missing expression
java.sql.SQLException: ORA-00936: missing expression
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:503)
at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:965)
at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:535)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1051)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2984)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3026)
at com.sunopsis.sql.SnpsQuery.executeQuery(SnpsQuery.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.i(e.java)
at com.sunopsis.dwg.cmd.g.y(g.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Unknown Source) -
How to Extract Data from Oracle DB ?
hi,
I am trying to Extract Data from Oracle DB using DBconnect. and looks like its not working. Not able to connect to Database.
thanksHi,
Can you please follw the below steps:
If you need to load data from an Oracleu2122 database use DB Connect instead of an ETL Tool
Although limited to full updates, it allows true u201Chands-offu201D automation of data extraction
Is not limited to Oracleu2122 databases, it supports ALL database systems supported by SAP BW
DB Connect can read the remote data dictionary, replicate table and views, and transfer metadata into the SAP BW Meta Data Repository.
1.Begin with your data model
2.Identify which tables provide:
Master Data
Transactional Data
3.Once the model is complete:
Obtain a UID and Password from the DBA
Ensure that table synonyms are not used u2013 they donu2019t work at this point in time (SAP Note # 518241)
Your UID has to have select permissions on the required database objects.
4.In the admin workbench open the modeling tab and select Source Systems
5.In the right pane, right-click on Source Systems and select Createu2026
6. you have to define the type of source system. Select u201CDatabase Systemu201D
7.Enter a description for the source system
8.Once you accept the definition of the source system, you have to provide the following information, save and back out:
DBMS: ORA (Oracle)
User Name: Your UID
DB password: Your pwd
Conn. Info: sql*net string
Select u201CPermanent connectionu201D if this is the case
9.If everything went well, you should see the new source system. When you do a right-click and ask for the DataSource overview, the first time you execute it you will be prompted to generate the application hierarchy. Answer yes to the prompt and then you will be able to see the DataSource tree.
10.In order to test connectivity, right-click on the source system and select u201CSelect Database Tablesu201D
11.Click on the execute button.
12.Next shows up displaying any tables or views that you have access through your UID
13.Select a table or view and click on u201CEdit DataSourceu201D.
14.To test data retrieval, click on u201CDisplay table contentsu201D
15.Designate the application component, determine the type of DataSource (Text, Master data, or Transaction data) then generate the DataSource.
16.For each applicable table/view generate the repeat steps 13 to 15.
17.From there, assign the DataSource to each target (InfoObject, InfoProvider) as usual.
Moving from Dev to QA to Prod:
18.Before transporting all you configuration work, you will have to manually set up the source system (Steps 4 to 8) in your QA or Prod
19.Depending on your authorization settings in Production, you may need to implement a system restore. Work with BASIS if you need to, donu2019t do it on your own!
20.Then transport your InfoObjects, InfoProviders, Update Rules, Transfer Rules, InfoPackages, etc.
21.If you developed the process chains, transport them separately.
22.Try to maximize throughput by using parallel processing of master data
23.Ensure the right sequence for transactional data loads is followe.
24.Combine the master data loads and the transactional data loads in a master process chain.
It can be help full.
Regards, -
JSON - get data from Oracle table
Hi all,
I hope it is correct thread...
My need is to get data from oracle table using JSON and show output at html table. I'm very new to JSON (got some experience in PL/SQL and basic html knowledge). Could someone direct me to manual or give me simple example?JSON is a way to format data, not a way to fetch data. Call it an alternative to XML.
Are you perhaps talking about doing an ajax request to fetch data? -
Retrieve specific range data from oracle table
Hi, Dear friends,
I want to retrieve all the data from oracle table and then save them to mysql table using JDBC ResultSet. The problem is that some oracle table is too big, if I retrieve all of them to memory at a once time using excuteQuery, the program will become no response out of memory limitation. So my question is if I can retrieve just specific range data once a time. I can¡¯t find this function through JDBC API. Also, I don¡¯t want to use the specific sql sentence, for example ¡°select ¡ from¡ where someid>¡ and someid<¡¡±, because there are many different tables, I want to transfer them automatically. So I can¡¯t construct such sql sentence in advance. Does anyone know if oracle JDBC driver provide such kind of function or does there any other way?
Any suggestion will be greatly appreciated!
SammyDear Justin,
thank you so much for your prompt reply!
as your suggestion, I do check the performance while my program is running, after the program become nearly no response, I found the memory usage is nearly 100%, while disk usage and process usage is pretty low. that's the reason why I guess maybe the memory limitation, but the strange thing is that no any error reported by JBuilder, it just nearly no response and don't transfer any data any more. my os is windows xp, the version of JBuilder is 7. my main memory is 768M. just as you said, the total 6,000 records in not very large, just no more than 400K. another strange thing is that why my program works well when there is little data records in the table.
the big picture of my program is first I retrieve oracle table metadata, according to this information, I construct DDL sql words and then create the corresponding table in mysql database. this part works well. in order to save your time, I will not paste the code here. then there is a method to transfer oracle data to mysql table, whenever creating the mysql table, then I will call this method to transfer datat to it. the following is the code of this method, I am very sorry to take your time. please read it when you are available.
thank you very much!!
Sammy
//transfer data from oracle to mysql!!!
private static void transferData(Connection oracleConn, Connection mysqlConn, String oracleTableName, String oracleSchemaName) throws SQLException{
Statement oracleStmt=oracleConn.createStatement();
Statement mysqlStmt=mysqlConn.createStatement();
// sending sql to oracle to retrieve data
String thisTableName=oracleTableName;
String oracleSQL="SELECT * FROM ".concat(thisTableName);
ResultSet oracleRS = oracleStmt.executeQuery(oracleSQL);
String sql="";
if (oracleRS.next()) {
ResultSetMetaData rsmd = oracleRS.getMetaData();
int colCount = rsmd.getColumnCount();
do {
String sqlBodyPart="";
String sqlValuePart="";
System.out.println("the number of column is "+colCount);
for (int i = 1; i <= colCount; i++) {
String columnValue = oracleRS.getString(i);
boolean b = oracleRS.wasNull();
String columnName =rsmd.getColumnName(i);
System.out.println("the value of column " + i + "is " + columnValue);
//construc the sql body part and value part
sqlBodyPart=sqlBodyPart.concat(" ").concat(columnName).concat(",");
if(b){ //if the value of the column i is null
sqlValuePart=sqlValuePart.concat(" null").concat(",");
}else{
sqlValuePart=sqlValuePart.concat(" '").concat(columnValue).concat("',");
//get rid of the last comma in sqlBodyPart and sqlValuePart
if(!sqlBodyPart.equalsIgnoreCase("")) sqlBodyPart=sqlBodyPart.substring(0,sqlBodyPart.length()-1);
if(!sqlValuePart.equalsIgnoreCase("")) sqlValuePart=sqlValuePart.substring(0,sqlValuePart.length()-1);
//construct the sql sentence!!!
sql="INSERT INTO ".concat(thisTableName).concat(" (").concat(sqlBodyPart).concat(") ").concat(" VALUES(").concat(sqlValuePart).concat(")");
System.out.println("the sql words for this column is");
System.out.println(sql);
System.out.println(" ");
if(mysqlStmt!=null){
int rows = mysqlStmt.executeUpdate(sql);
} else{
System.out.println("can't connect with mysql server");
System.exit(1);
while (oracleRS.next());
} else {
System.out.println("There are no data in the table...");
}//end of method data transfer!
//end of method data transfer! -
Get date from Oracle when local time zone is different from Oracle time zon
Hi!
Local machine time zone= +2
Oracle time zone= +1
I set date to Oracle using java.sql.Date.
From application I save date at 00:30 clock and send e.g. 28.06.2002, but in Oracle date is save as 27.06.2002 01:00 (hour=01 , I suppose that is because java.sql.Date hasn't time the Oracle set it time = time zone=+1) And when I get date from Oracle I get incorrect date. In SQL I don't use date masks. Maybe solution is to use java.sql.Timestamp object (when save date to Oracle) instead of java.sql.Date?
But if I save date at e.g. 01:00 clock and send e.g. 28:06.2002 in Oracle, date is save as 28.06.2002 01:00 and when I read from Oracle I get correct date.
Thank you.Hi!
Local machine time zone= +2
Oracle time zone= +1
I set date to Oracle using java.sql.Date.
From application I save date at 00:30 clock and send
e.g. 28.06.2002, but in Oracle date is save as
27.06.2002 01:00 (hour=01 , I suppose that is because
java.sql.Date hasn't time the Oracle set it time =
time zone=+1) Presumably you are using setTimestamp() to store the value. If you are explicitly using a varchar (string) then you will have to correct the timezone your self.
And when I get date from Oracle I get
incorrect date. In SQL I don't use date masks. Maybe
solution is to use java.sql.Timestamp object (when
save date to Oracle) instead of java.sql.Date?The method setDate/getDate store a 'date' which is not the same as a 'date and time' for which setTimestamp/getTimestamp are used.
But if I save date at e.g. 01:00 clock and send e.g.
28:06.2002 in Oracle, date is save as 28.06.2002
01:00 and when I read from Oracle I get correct date.
Thank you. -
Exporting Data From Oracle 10g to Access
Hi Experts,
I need to export data from oracle apps shcema(each and every object in it) to MS ACCESS File.
Please let me know how to do it
Thanks and Regards,
AndySince you did not provide details of what you are planning to do, a very simple, however, depending upon the number of your tables, very labour intensive solution:
Although being not very familiar with access, I think access offers a means to import csv files.
So e.g. using SQL*Plus you can execute the following steps.
set pagesize <nnn>
set linesize <nnn>
set colsep ',' -- You may choose other special characters to separate columns of your output
spool <csv-file>
select * from <tab>;
spool offWherever you see <nnn> exchange by appropriate numeric values to get just one page as result and to configure your line size to hold a complete record in one output line.
Replace <csv-file> and <tab> by the name of your output file to be read in to access and by the name of your table, respectively. -
Error while retreiving data from oracle using EJB.
HII All,
I m getting this error while trying to retreive data from oracle DB using EJB.
An error has occurred. Maybe the request is not accepted by the server:
Exception in method empName.
HTTP/1.1 500 Internal Server Error
Connection: close
Server: SAP J2EE Engine/6.40
Content-Type: text/xml; charset=UTF-8
Set-Cookie: <value is hidden>
Date: Mon, 24 Jul 2006 10:50:11 GMT
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>Exception in method empName.</faultstring><detail><ns1:com.sap.engine.services.ejb.exceptions.BaseEJBException xmlns:ns1='http://sap-j2ee-engine/client-runtime-error'>Exception in method empName.</ns1:com.sap.engine.services.ejb.exceptions.BaseEJBException></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
Thanks in advance
Devendra Phate.Hi Devendra,
this error message does not tell me much. Pleas either start debugging or watch your logs for more detailed messages.
Regards,
Benny -
Error, while pushing the data from Oracle to MSSQL.
Hi,
I am facing the below error, while pushing the data from Oracle to MSSQL.
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Transparent gateway for MSSQL][Microsoft][ODBC SQL Server Driver][SQL Server]Update or insert of view or function 'View_Name' failed because it contains a derived or constant field.[Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared. (SQL State: 00000; SQL Code: 8180)
Please suggest me, how to overcome from this.
Thanks.[email protected] wrote:
Hi,
I am facing the below error, while pushing the data from Oracle to MSSQL.
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Transparent gateway for MSSQL][Microsoft][ODBC SQL Server Driver][SQL Server]Update or insert of view or function 'View_Name' failed because it contains a derived or constant field.[Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared. (SQL State: 00000; SQL Code: 8180)
Please suggest me, how to overcome from this.
Thanks.This is an error from SQL Server being passed back to Oracle so you can see the problem.
What it is saying is that you are trying to insert (or update) data to a database view and that view contains a column that is either a constant (literal) value or is derived (a calculation, formula or string concatenation etc.).
As such, you can't insert or update data on that column because it has nowhere to go on the database table(s) that underly the view. -
Using FDM to load data from oracle table (Integration Import Script)
Hi,
I am using Integration Import Script to load data from oracle table to worktables in FDM.
i am getting following error while running the script.
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done
Attaching the full error report
ERROR:
Code............................................. -2147217887
Description...................................... Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
At line: 22
Procedure........................................ clsImpProcessMgr.fLoadAndProcessFile
Component........................................ upsWObjectsDM
Version.......................................... 1112
Thread........................................... 6260
IDENTIFICATION:
User............................................. ******
Computer Name.................................... *******
App Name......................................... FDMAPP
Client App....................................... WebClient
CONNECTION:
Provider......................................... ORAOLEDB.ORACLE
Data Server......................................
Database Name.................................... DBNAME
Trusted Connect.................................. False
Connect Status.. Connection Open
GLOBALS:
Location......................................... SCRTEST
Location ID...................................... 750
Location Seg..................................... 4
Category......................................... FDM ACTUAL
Category ID...................................... 13
Period........................................... Jun - 2011
Period ID........................................ 6/30/2011
POV Local........................................ True
Language......................................... 1033
User Level....................................... 1
All Partitions................................... True
Is Auditor....................................... False
I am using the following script
Function ImpScrTest(strLoc, lngCatKey, dblPerKey, strWorkTableName)
'Oracle Hyperion FDM Integration Import Script:
'Created By: Dhananjay
'Date Created: 1/17/2012 10:29:53 AM
'Purpose:A test script to import data from Oracle EBS tables
Dim cnSS 'ADODB.Connection
Dim strSQL 'SQL string
Dim rs 'Recordset
Dim rsAppend 'tTB table append rs object
'Initialize objects
Set cnSS = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")
Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)
'Connect to SQL Server database
cnss.open "Provider=OraOLEDB.Oracle.1;Data Source= +server+;Initial Catalog= +catalog+;User ID= +uid+;Password= +pass+"
'Create query string
strSQL = "Select AMOUNT,DESCRIPTION,ACCOUNT,ENTITY FROM +catalog+.TEST_TMP"
'Get data
rs.Open strSQL, cnSS
'Check for data
If rs.bof And rs.eof Then
RES.PlngActionType = 2
RES.PstrActionValue = "No Records to load!"
Exit Function
End If
'Loop through records and append to tTB table in location’s DB
If Not rs.bof And Not rs.eof Then
Do While Not rs.eof
rsAppend.AddNew
rsAppend.Fields("PartitionKey") = RES.PlngLocKey
rsAppend.Fields("CatKey") = RES.PlngCatKey
rsAppend.Fields("PeriodKey") = RES.PdtePerKey
rsAppend.Fields("DataView") = "YTD"
rsAppend.Fields("CalcAcctType") = 9
rsAppend.Fields("Amount") = rs.fields("Amount").Value
rsAppend.Fields("Desc1") = rs.fields("Description").Value
rsAppend.Fields("Account") = rs.fields("Account").Value
rsAppend.Fields("Entity") = rs.fields("Entity").Value
rsAppend.Update
rs.movenext
Loop
End If
'Records loaded
RES.PlngActionType = 6
RES.PstrActionValue = "Import successful!"
'Assign Return value
SQLIntegration = True
End Function
Please help me on this
Thanks,
Dhananjay
Edited by: DBS on Feb 9, 2012 10:21 PMHi,
I found the problem.It was because of the connection string.The format was different for oracle tables.
PFB the format
*cnss.open"Provider=OraOLEDB.Oracle.1;Data Source= servername:port/SID;Database= DB;User Id=aaaa;Password=aaaa;"*
And thanks *SH* for quick response.
So closing the thread......
Thanks,
Dhananjay -
Which CKM is used for moving data from Oracle to delimited file ?
Hi All
Please let me know Which CKM is used for moving data from Oracle to delimited file ?
Also is there need of defining each columns before hand in target datastore. Cant ODI take it from the oracle table itself ?Addy,
A CKM is a Check KM which is used to validate data and log errors. It is not going to assist you in data movement. You will need an LKM SQL to File append as answered in another thread.
Assuming that you have a one to one mapping, to make things simpler you can duplicate the Oracle based model and create a file based model. This will take all the column definitions from the Oracle based model.
Alternatively, you can also use an ODI tool odiSQLUnload to dump the data to a file
HTH -
Query Data From Oracle to Excel
Dear all,
Please guide me to solve.
Regards
DharmaQuestion's Caption is : Data From Oracle to Excel
While you are asking :
data in execel (windows ) move to Oracle Database table (Linux *64)Anyway, if your question is export data from Excel to Oracle then below thread may be of your interest which are saying that you have to install Dg4ODBC on Windows and use the ODBC driver there.
When running DG4ODBC on Unix you need an ODBC driver on this Unix box which can connect to the MS Excel file. I'm not aware of any suitable driver so far that fulfills the ODBC level 3 standard required for DG4ODBC.
So instead of using DG4ODBC, get the Windows software of DG4ODBC and install it on a Windows machine. You can then connect from your Oracle database to the Dg4ODBC listener on Windows which then spawns the DG4ODBC process. This DG4ODBC process then uses the MS Excel ODBC driver to connect to the Excel sheet.
https://cn.forums.oracle.com/forums/thread.jspa?messageID=10466197
For this purpose there is separate forum too : [url https://forums.oracle.com/forums/forum.jspa?forumID=63] Heterogeneous Connectivity
Regards
Girish Sharma
Maybe you are looking for
-
Confused between Corporate and Affiliate stores, account is a mess!
All i did was go to the wrong store my wife and i where getting divorced when all this was going on its a nightmare when we tried to put the account in my name only as part of the divorce in the store filled papers with the manager3 week s later
-
How to read the hierarchy data from the same table using loop in AMDP method
Hi All, We have a requirement to get the top partner from BUT050 table. Here the Top parent is nothing but the top most in the hierarchy of the partners from BUT050. Example: For partner 1234 (BUT050-PARTNER1) there is partner 3523(BUT050-PARTNER2) o
-
Problem: The wife is viewing an event in iPhoto 09 on the iMac. Every so often, a random image won't completely open...it enlarges part way, then hangs, then the beach ball. Or, the image opens all the way (filling the work area), but doesn't finish
-
I get redirects always in current open page. If I click a link and say open in new tab or new window it does not redirect. I've noticed explorer is now advertising built in software to eliminate someone hijacking their browser. If I have to keep sear
-
Facing the problem ValueChangeListener of the Drop Down List
Hi, I am using the JDeveloper 10.1.3.5.0 and the JHeadStart 10.1.3.3.88. In my requirement, I am having three View Objects(V1,V2,V3). I need to create a page based on one VO(V1) displayed as table. In the screen, there are 6 columns. Three of them(C1