Error in SQL statement Arithmetic operation resulted in an overflow - oracle

I am trying to connect ODBC 64bit Driver to allow me execute query to extract data from JDE 8.12
After building open SQL Connection and execute simple query it appear an error "Error in SQL statement Arithmetic operation resulted in an overflow."
Could you please advise what is missing in order to allow the query to be execute?
Steps which I did:
1 - I selected Microsot OLE DB Provider for ODBC Driver
2- Selected Driver (Driver - Oracle in OraClient 11g64_home1)
3 -Test The connection and show successful
4 - Build simple query to test the Flow
5- After run the Flow I get error
"Error in SQL statement Arithmetic operation resulted in an overflow."
After successful connection , I was expecting simple query to be executed without issue.

It is possible that your Orale client is 32-bit only and the application using it is not x86 compiled.
Also, it's possible that you have a numeric field of certain limitation and a value is being computed arithmetically and then attempted to be stored into the field, overflowing its bounds.

Related

"The statement did not return a result set" on Create table (JDBC) [duplicate]

My original environment is SQL server 2005 + WebSphere v6.0(JDBC 3.0). When I run the program as below and it works well.
ResultSet rs=stmt.executeQuery(sql);
rs.next();
However, when I upgrade the environment to SQL server 2005 + WebSphere v8.5(JDBC 4.0), I get the error message:
com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not
return a result set.
From this forum's information, it seems that I have multiple resultsets, so I try to change the program as follows and it works fine.
stmt.execute(sql);
stmt.getMoreResults();
stmt.getMoreResults();
ResultSet rs=stmt.getResultSet();
rs.next();
My questions is that is there any approach that I can keep my program unchanged and works well with JDBC 4.0 driver(WAS v8.5) or any combination like SQL svr 2000 + WAS v8.5, etc.
Please give me any pointer and your recommendation is valuable to me, thank you.
Ann
You are attempting to execute a query that either produces multiple resultsets or that does not produce a resultset (eg UPDATE, INSERT etc) using executeQuery. The Javadoc for this method explicitly says:
Throws: SQLException - if a database access error occurs, this method is called on a closed Statement, the given SQL statement produces anything other than a single ResultSet object
You either need to use the executeUpdate method (if it is actually an update/insert/delete, or execute and then use the resulting boolean and that of getMoreResults() to decide how to proceed.

SSIS For Loop ODBC

I’m extracting data from a table in Oracle.
I have an ODBC connection manager to the Oracle database and the query for extraction should include a where clause because the table contain transactional data and there is no reason to extract it all every time.
I want initialize the table once and do it in with a For Loop which will iterate the whole table.
Since it’s an ODBC connection I can’t just put a where clause because I need to use a variable hence I realized I need to parameterize the DataFlow task and write my query at the sqlcommand property containing the ODBC source.
The property value is:
SELECT *
FROM DDC.DDC_SALES_TBL
WHERE trunc(CALDAY) between to_date('"+ #[User::vstart]+"','MM/DD/YYYY')
and to_date('"+ #[User::vstop]+"','MM/DD/YYYY')
Where the #vstart and #vstop are variables containing the ‘from/to’ dates to be extracted based on a DATEADD function and another variable (#vcount) which supposed to be the iterator as follows:
(DT_WSTR, 2) MONTH( DATEADD( "day", #[User::vcount] , GETDATE() ) )+"/"+
(DT_WSTR, 2) DAY( DATEADD( "day", #[User::vcount] , GETDATE() ) )+"/"+
(DT_WSTR, 4) YEAR( DATEADD( "day", #[User::vcount] , GETDATE() ) )
What’s happening is that the first iteration works fine but the second one generates an error and the package fails.
I marked the variable as EvaluateAsExpression=True
I also marked the DelayValidation=True in both the For Loop and the DataFlow tasks.
The errors are:
(1)Data Flow Task:Error: SQLSTATE: HY010, Message: [Microsoft][ODBC Driver Manager] Function sequence error;
(2) Data Flow Task:Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "ODBC Source.Outputs[ODBC Source Output]" failed because error code 0xC020F450 occurred, and the error row disposition on "ODBC Source" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.
(3) Data Flow Task:Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on ODBC Source returned error code 0xC0209029. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
Please assist.
I don't know why initially i didn't use OLEDB, as I thought it doesn't work.
What i tried was to use create an OLEDB via oracle driver and the connection manager worked so i used it.
As this way you can parameterize the source directly and the loop worked just fine.
Don't know what cause the conflict with the OBDC source but that's my workaround.
I didn't find a way to setup the sqlcommand property in ODBC source and using it in a loop which should change the the command every iteration. It crashed after the first iteration ni matter what i tried.
Thanks,
I was having the same issue when using Oracle Source, updating the Attunity Connectors for Oracle as well as the OLEDB driver for SQL Server worked to fix the problem.

Hortonworks Hive ODBC Driver DB-240000

DB-240000 ODBC error: [Hortonworks][Hardy] (80) Syntax or semantic
analysis error thrown in server while executing query.
Error message from server: Error while compiling statement: FAILED:
ParseException line 1:12 cannot recognize input near 'ALL_ROWS'
'*' '/' in hint name SQLState: 37000
Sample query
WDB-200001 SQL statement 'SELECT /*+ ALL_ROWS */ A.test FROM table A' could not be executed.
Syntax looks right as per documentation (https://docs.oracle.com/cd/E11882_01/server.112/e41084/sql_elements006.htm#SQLRF51108)
Or is there a missing param on the odbc configuration?
https://hortonworks.com/wp-content/uploads/2015/10/Hortonworks-Hive-ODBC-Driver-User-Guide.pdf
Use Native Query Key Name Default Value Required UseNativeQuery Clear
(0) No Architecting the Future of Big Data Hortonworks Inc. Page 71
Description When this option is enabled (1), the driver does not
transform the queries emitted by an application, so the native query
is used. When this option is disabled (0), the driver transforms the
queries emitted by an application and converts them into an equivalent
from in HiveQL. Note: If the application is Hive-aware and already
emits Hive
Could this be an issue with HDP versioning?
Is there a missing Param
in the ODBC connection string?

Jmeter 3.0 Cannot create PoolableConnectionFactory (ORA-00900: invalid SQL statement)

I am using Oracle DB from Jmeter and I am running Select statement with a very small query, I am getting below error
Response message: java.sql.SQLException: Cannot create PoolableConnectionFactory (ORA-00900: invalid SQL statement)
You change the default values, and most important you define zero time to wait for connection. so you can't create connection.
Set Max Wait to a valid value as 10000
Max Wait (ms) Pool throws an error if the timeout period is exceeded in the process of trying to retrieve a connection
Also I'm not sure about your validation query, for Oracle it should be
Select 1 from dual
Validation Query A simple query used to determine if the database is still responding. This defaults to the 'isValid()' method of the jdbc driver, which is suitable for many databases. However some may require a different query; for example Oracle something like 'SELECT 1 FROM DUAL' could be used.
You need to remove getData from the "Validation Query" and replace it with select 1 from dual
Also consider upgrading to JMeter 4.0 on next available opportunity as according to JMeter Best Practices you should always be using the last available JMeter version, newer JMeter versions normally contain bug fixes, new features and performance improvements so it might be the case you're suffering from a bug which has already been addressed.

Cannot create PoolableConnectionFactory (ORA-00936: missing expression ): JDBC connection error in Jmeter3.0

I am running one jmeter script to read data from Database (using JDBC Request). Here I am getting following error if I am running script in Jmeter3.0.
Cannot create PoolableConnectionFactory (ORA-00936: missing expression
)
But same script is running fine with jmeter2.13.
Do I need to change any property values?
Just modify Validation query in JDBC Connection Configuration to select 1 from DUAL as per documentation:
A simple query used to determine if the database is still responding. This defaults to 'SELECT 1' which is suitable for many databases. However some may require a different query; for example Oracle requires something like 'SELECT 1 FROM DUAL'. Note this validation query is used on pool creation to validate it even if "Test While Idle" suggests query would only be used on idle connections. This is DBCP behaviour.

Resources