473,769 Members | 7,355 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Federated (information integrator) load from cursor - Oracle date problem

Hi All;
We have many production jobs that "load from cursor" to a UDB/AIX 8.2
(with dpf) data warehouse from source tables residing Oracle 9i. Since
Oracle dates are (roughly) equivalent to DB2 timestamps, we frequently
use the date() function to "convert" from the Oracle date datatype to
the DB2 date datatype.

We have used this technique on over 20 Oracle tables for several months
with no problem. One table in particular fails with a sqlcode -180
(invalid db2 date value). Does anyone why we might be seeing this?.
Could it be that Oracle supports dates outside the range of that which
is supported by db2? Any help appreciated. Job output below...

Pete H
-------------------------------------------------
declare fedcurs cursor for
Select item
, loc
, constrstocklowq ty
, date(constrstoc klowdate)
, constrstocklowd ur
, constrstocklowq ty
, date(constrstoc koutdate)
, constrstockoutd ur
, maxconstrcovdur
, date(maxconstrc ovdate)
from fdr.manu_skusta tstatic
where item not like 'ITC%'
and item not like 'RM%'
and item not like 'PGM%'
and item not like 'IGP%'
and item not like 'ITM%'
;
SQLCODE is: 0

sqlcaid : SQLCA sqlcabc: 136 sqlcode: 0 sqlerrml: 0
sqlerrmc:
sqlerrp : SQL08023
sqlerrd : (1) 0 (2) 0 (3) 511397
(4) 180107 (5) 0 (6) 1
sqlwarn : (1) (2) (3) (4) (5) (6)
(7) (8) (9) (10) (11)
sqlstate: 00000
SQL stmt is:
load from fedcurs of cursor warningcount 2
messages /xxxx/prod/syslog/irw147.2006-06-05-02:55:08/irw147.loadmsgs
replace into STAGE.manu_skus tatstatic
data buffer 600
redirect_part_o utput
/xxxx/prod/syslog/irw147.2006-06-05-02:55:08/load.log
;
SQLCODE is: -180

sqlcaid : SQLCA sqlcabc: 136 sqlcode: -180 sqlerrml: 0
sqlerrmc:
sqlerrp : SQLSNERR
sqlerrd : (1) 0 (2) 0 (3) 0
(4) 0 (5) 0 (6) 0
sqlwarn : (1) (2) (3) (4) (5) (6)
(7) (8) (9) (10) (11)
sqlstate: 22007

Jun 9 '06
14 4443
Knut Stolze wrote:
DA Morgan wrote:
SQL> SELECT datecol
2 FROM datedemo
3 WHERE datecol > TO_DATE('31-DEC-9999');


What does the query return if you omit the TO_DATE function call?

I'm asking because there may be an issue in the Oracle wrapper. If so, it
would be good to get it fixed.


Thanks. It seems likely your analysis is correct.
--
Daniel A. Morgan
University of Washington
da******@x.wash ington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Jun 13 '06 #11
DA Morgan wrote:

1. What version Oracle 9.2.0.7.0 on AIX
2. Dates, in Oracle, are not strings ... use TO_DATE Of course I understand this. I have run the following query via
SQLPlus:
select constrstockoutd ate
from stsc.skustatsta tic
where constrstockoutd ate >= TO_DATE('31-DEC-9999');
~
CONSTRSTO
---------
16-APR-39

As you can see, the column "constrstockout date" (defined as an Oracle
DATE), appears to meet criteria suggesting that it is larger than
Oracle's maximum allowable value for a DATE column. The column is
populated by a 3rd party application for which I do not have the code
(we are working with the vendor - who as it turns out is working with
Oracle).
3. Why is this in the DB2 usenet group? If you wish to pursue it lets
be courteous and take it to comp.databases. oracle.server.

If you will look at the thread history, you will see that the problem
1st manifested itself via DB2 federated access to the data in question.
It was only after seeing funky things in native Oracle queries that I
started questioning Oracle iself. As far as taking the issue to
comp.databases. oracle.server, I hate to x-post and find the discourse
in this group to be slightly more civilized and interested in
problem-solving. We are able to work around the problem in our DB2
environment by filtering on date ranges outside of the year 0001 and
9999 (which might be necessary anyway since Oracle supports negative
year values representing years BC).

Please feel free to post any or all of this thread in
comp.databases. oracle.server

Pete H

Jun 13 '06 #12

Knut Stolze wrote:
Pete was accessing an Oracle DB through the federated capabilities of DB2
(or rather Information Integrator). So the problem may have been with the
DB2->Oracle wrapper, which we could rule out.


Thanks Knut - but I think the wrapper is doing its job throwing a -180
for a non-valid DB2 date/timestamp format (see my post below). The only
mystery to me at this point is how that one row of data greater than
12/31/9999 got into the source dbms.

Pete H

Jun 13 '06 #13
peteh wrote:
Knut Stolze wrote:
Pete was accessing an Oracle DB through the federated capabilities of DB2
(or rather Information Integrator). So the problem may have been with the
DB2->Oracle wrapper, which we could rule out.


Thanks Knut - but I think the wrapper is doing its job throwing a -180
for a non-valid DB2 date/timestamp format (see my post below). The only
mystery to me at this point is how that one row of data greater than
12/31/9999 got into the source dbms.

Yep. Do you have a corrupted database which has remained undetected, or
was it just a bug (which may or may not have long been fixed) in Oracle
on the INSERT/UPDATE statement.
Not knowing the misc. bits configurations of Oracle. Are sanity bits and
checksums always on in Oracle?
Could it be that e.g. half a page was written... (e.g. DB2 protects
against that by toggling the first and last bit of a page).
I guess punting to the Oracle NG may be the right action.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Jun 13 '06 #14
peteh wrote:
DA Morgan wrote:
1. What version

Oracle 9.2.0.7.0 on AIX
2. Dates, in Oracle, are not strings ... use TO_DATE

Of course I understand this. I have run the following query via
SQLPlus:
select constrstockoutd ate
from stsc.skustatsta tic
where constrstockoutd ate >= TO_DATE('31-DEC-9999');
~
CONSTRSTO
---------
16-APR-39

As you can see, the column "constrstockout date" (defined as an Oracle
DATE), appears to meet criteria suggesting that it is larger than
Oracle's maximum allowable value for a DATE column. The column is
populated by a 3rd party application for which I do not have the code
(we are working with the vendor - who as it turns out is working with
Oracle).
3. Why is this in the DB2 usenet group? If you wish to pursue it lets
be courteous and take it to comp.databases. oracle.server.

If you will look at the thread history, you will see that the problem
1st manifested itself via DB2 federated access to the data in question.
It was only after seeing funky things in native Oracle queries that I
started questioning Oracle iself. As far as taking the issue to
comp.databases. oracle.server, I hate to x-post and find the discourse
in this group to be slightly more civilized and interested in
problem-solving. We are able to work around the problem in our DB2
environment by filtering on date ranges outside of the year 0001 and
9999 (which might be necessary anyway since Oracle supports negative
year values representing years BC).

Please feel free to post any or all of this thread in
comp.databases. oracle.server

Pete H


Looks like a problem specific to an earlier version of Oracle as you can
see:

SQL*Plus: Release 10.2.0.2.0 - Production on Wed Jun 14 09:50:38 2006

Copyright (c) 1982, 2005, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> desc datedemo
Name Null? Type
----------------------------------------- -------- ------------------
DATECOL DATE

SQL> select * from datedemo
2 where datecol >= TO_DATE('31-DEC-9999');

DATECOL
---------
31-DEC-99

SQL>
--
Daniel A. Morgan
University of Washington
da******@x.wash ington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Jun 14 '06 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
606
by: uthuras | last post by:
Greetings all, Is it possible to have federated db feature implemented among DB2 family? I intend to create federated within DB2 databases. I have 2 databases TestA and TestB. I have some base tables in TestA database and the reference tables in TestB database. Now i want to select data from TestB database referencing base table in TestA database. One of the way would be Federated Database. I've seen some red books on setting up...
2
2546
by: stevenkblack | last post by:
I just installed Information Integrator on my machine Windows XP db2 8.2.1. I want to connect to Oracle 9i. The closest thing I saw when trying to create the wrapper was Oracle8. It says the Library name is db2net8.dll but the error that comes up when I try to create it is "The specified library "db2net8U.dll" could not be loaded. SQLSTATE=42724" I found the db2net8U.dll in the f:\ibm\sqllib\bin directory so there is no reason that it...
5
5393
by: Michael Rudolph | last post by:
Hi newsgroup, I have an issue with the configuration of a DB2 federated database (WebSphere Information Integrator) in conjunction with the relational wrapper for Oracle on AIX. DB2 seems to not use the existing tnsnames.ora. The Oracle client is installed and the connection to the Oracle database using tnsping and sqlplus is possible (for the db2instance user). For that I changed the environment for the db2instanceuser and added the...
3
6562
by: Michael Rudolph | last post by:
Hi, at the moment i try to use the federated database feature (DB2/NT 8.2.3) to use a remote host db2 (DB2 OS/390 7.1.2). I am unsure what privileges are needed for the host db2 user. A select on SYSIBM.SYSTABLES and on the tables where the data resides as mentioned in the following URL is successful.
7
6576
by: P. Adhia | last post by:
Sorry for quoting an old post and probably I am reading out of context so my concern is unfounded. But I would appreciate if I can get someone or Serge to confirm. Also unlike the question asked in the post below, my question involves non-partitioned table loads. I want to know if, in general, loading from cursor is slower than loading from a file? I was thinking cursor would normally be faster, because of DB2's superior buffer/prefetch...
0
1845
by: Frank Swarbrick | last post by:
Is Websphere Information Integrator supported on Linux for zSeries? Here's the deal... We are a VSE mainframe shop. We do not currently have access to any relational databases from VSE. We use VSAM and DL/I for our mainframe data. Our "distributed applications" side uses Oracle 9i and 10g. We have two distinct but related goals. 1) Have a relational database for our mainframe data. 2) Access our existing Oracle databases from our...
4
3456
by: Praveen_db2 | last post by:
Hi All DB2 8.1.3,Windows I have 2 databases in a single instance, say DB_1 and DB_2.I need to query a table from DB_1 in DB_2.I am try to use a nickname for it.But nickname creation is not possible until federated server is made.Please tell me how to create a federated server.Moreover, is there any thing extra which I need to buy for this?When I gave this command to create a server CREATE SERVER "TEST1" TYPE DB2/UDB VERSION 8.1
9
5750
by: mitek | last post by:
Hi, All. Is federated procedures between DB2 databases currently not supported in WebSphere Federation Server 9.1 ??? I recieve next error when trying to create DB2 federated procedure : SQL30090N Operation invalid for application execution environment. Reason code = "21". LINE NUMBER=1.
3
2050
by: peteh | last post by:
Hi All; I have tried to find this info on the IBM site, but alas... We are running DB2 v9.1.1 and making extensive use of Information Integrator (now known as Websphere Federation Server?!) to access Oracle and other DB2s (LUW, AS400 and z/OS). We have some requirements to integrate Excel data. In looking at our options 18 months ago (v8.2), we needed some additional Windows components (drivers and ODBC communication software) to make...
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10216
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9865
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5309
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3965
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3565
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.