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 14 4442
peteh wrote: 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?
You get the same error if you run the query as is (w/o cursor or the load)
on the command line? If yes, then you should try to narrow down which rows
are failing and then have a look at the Oracle DATE value there.
--
Knut Stolze
DB2 Information Integration Development
IBM Germany
> > snip<< 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?
You get the same error if you run the query as is (w/o cursor or the load) on the command line? If yes, then you should try to narrow down which rows are failing and then have a look at the Oracle DATE value there.
-- Knut Stolze DB2 Information Integration Development IBM Germany
Thanks Knut;
Yes - the query fails with or without the load. Turns out that although
Oracle claims to support a max date value of 9999-12-31, we managed to
get a single row into this table that even Oracle can't show us! When
querying Oracle directly with a WHERE clause of "date > '31-DEC-9999'",
we see a single row with a value of '16-APR-39' (?) Go figure... Assume
this is an Orace bug (say it ain't so!). Google shows at least one
other person encountering this mystery in the oracle group... Thanks
for your help. Looks like we'll need to hit up Oracle support and/or
filter for dates between '0001-01-01' and '9999-12-31'
Pete H
peteh wrote: snip<< 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? You get the same error if you run the query as is (w/o cursor or the load) on the command line? If yes, then you should try to narrow down which rows are failing and then have a look at the Oracle DATE value there.
-- Knut Stolze DB2 Information Integration Development IBM Germany
Thanks Knut; Yes - the query fails with or without the load. Turns out that although Oracle claims to support a max date value of 9999-12-31, we managed to get a single row into this table that even Oracle can't show us! When querying Oracle directly with a WHERE clause of "date > '31-DEC-9999'", we see a single row with a value of '16-APR-39' (?) Go figure... Assume this is an Orace bug (say it ain't so!). Google shows at least one other person encountering this mystery in the oracle group... Thanks for your help. Looks like we'll need to hit up Oracle support and/or filter for dates between '0001-01-01' and '9999-12-31'
Pete H
I suspect the problem is operator error rather than Oracle:
SQL*Plus: Release 10.2.0.2.0 - Production on Mon Jun 12 13:26:29 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> CREATE TABLE datedemo (
2 datecol DATE);
Table created.
SQL> INSERT INTO datedemo
2 (datecol)
3 VALUES
4 (TO_DATE('31-DEC-9999', 'DD-MON-YYYY'));
1 row created
SQL> commit;
Commit complete.
SQL> SELECT TO_CHAR(datecol , 'DD-MON-YYYY')
2 FROM datedemo;
TO_CHAR(DATECOL ,'DD-
--------------------
31-DEC-9999
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
DA Morgan wrote: peteh wrote: snip<< 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? You get the same error if you run the query as is (w/o cursor or the load) on the command line? If yes, then you should try to narrow down which rows are failing and then have a look at the Oracle DATE value there.
-- Knut Stolze DB2 Information Integration Development IBM Germany
Thanks Knut; Yes - the query fails with or without the load. Turns out that although Oracle claims to support a max date value of 9999-12-31, we managed to get a single row into this table that even Oracle can't show us! When querying Oracle directly with a WHERE clause of "date > '31-DEC-9999'", we see a single row with a value of '16-APR-39' (?) Go figure... Assume this is an Orace bug (say it ain't so!). Google shows at least one other person encountering this mystery in the oracle group... Thanks for your help. Looks like we'll need to hit up Oracle support and/or filter for dates between '0001-01-01' and '9999-12-31'
Pete H
I suspect the problem is operator error rather than Oracle:
SQL*Plus: Release 10.2.0.2.0 - Production on Mon Jun 12 13:26:29 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> CREATE TABLE datedemo ( 2 datecol DATE);
Table created.
SQL> INSERT INTO datedemo 2 (datecol) 3 VALUES 4 (TO_DATE('31-DEC-9999', 'DD-MON-YYYY'));
1 row created
SQL> commit;
Commit complete.
SQL> SELECT TO_CHAR(datecol , 'DD-MON-YYYY') 2 FROM datedemo;
TO_CHAR(DATECOL ,'DD- -------------------- 31-DEC-9999
You have a different scenario here. The OP has a query like
SELECT datecol
FROM datedemo
WHERE datecol > '31-DEC-9999'
(whatever date format that is supposed to be)
--
Knut Stolze
DB2 Information Integration Development
IBM Germany peteh wrote: snip<< Yes - the query fails with or without the load. Turns out that although Oracle claims to support a max date value of 9999-12-31, we managed to get a single row into this table that even Oracle can't show us! When querying Oracle directly with a WHERE clause of "date > '31-DEC-9999'", we see a single row with a value of '16-APR-39' (?) Go figure... Assume this is an Orace bug (say it ain't so!). Google shows at least one other person encountering this mystery in the oracle group... Thanks for your help. Looks like we'll need to hit up Oracle support and/or filter for dates between '0001-01-01' and '9999-12-31'
Pete H
DA Morgan wrote: I suspect the problem is operator error rather than Oracle:
BIG SNIP> --
Hi Daniel;
Your example seems to have little relevance to the problem I'm seeing.
If you'll notice in my previous post, Oracle returns the row with a
WHERE clause of date > '31-DEC-9999'" and shows a value of '16-APR-39'
in the date that meets this criteria. I stand by my assertion that
this certainly APPEARS to be a bug...
Pete H
Knut Stolze wrote: DA Morgan wrote:
peteh wrote:> snip<< > 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? You get the same error if you run the query as is (w/o cursor or the load) on the command line? If yes, then you should try to narrow down which rows are failing and then have a look at the Oracle DATE value there.
-- Knut Stolze DB2 Information Integration Development IBM Germany Thanks Knut; Yes - the query fails with or without the load. Turns out that although Oracle claims to support a max date value of 9999-12-31, we managed to get a single row into this table that even Oracle can't show us! When querying Oracle directly with a WHERE clause of "date > '31-DEC-9999'", we see a single row with a value of '16-APR-39' (?) Go figure... Assume this is an Orace bug (say it ain't so!). Google shows at least one other person encountering this mystery in the oracle group... Thanks for your help. Looks like we'll need to hit up Oracle support and/or filter for dates between '0001-01-01' and '9999-12-31'
Pete H I suspect the problem is operator error rather than Oracle:
SQL*Plus: Release 10.2.0.2.0 - Production on Mon Jun 12 13:26:29 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> CREATE TABLE datedemo ( 2 datecol DATE);
Table created.
SQL> INSERT INTO datedemo 2 (datecol) 3 VALUES 4 (TO_DATE('31-DEC-9999', 'DD-MON-YYYY'));
1 row created
SQL> commit;
Commit complete.
SQL> SELECT TO_CHAR(datecol , 'DD-MON-YYYY') 2 FROM datedemo;
TO_CHAR(DATECOL ,'DD- -------------------- 31-DEC-9999
You have a different scenario here. The OP has a query like
SELECT datecol FROM datedemo WHERE datecol > '31-DEC-9999'
(whatever date format that is supposed to be)
A string is not a date. The above query may work with an implicit
type conversion but Oracle clearly states that this is neither
recommended nor guaranteed to work.
But again this seems like operator error. See the following:
SQL*Plus: Release 10.2.0.2.0 - Production on Tue Jun 13 09:12:01 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;
DATECOL
---------
31-DEC-99
SQL> SELECT datecol
2 FROM datedemo
3 WHERE datecol > TO_DATE('31-DEC-9999');
no rows selected
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
peteh wrote: peteh wrote:> snip<< Yes - the query fails with or without the load. Turns out that although Oracle claims to support a max date value of 9999-12-31, we managed to get a single row into this table that even Oracle can't show us! When querying Oracle directly with a WHERE clause of "date > '31-DEC-9999'", we see a single row with a value of '16-APR-39' (?) Go figure... Assume this is an Orace bug (say it ain't so!). Google shows at least one other person encountering this mystery in the oracle group... Thanks for your help. Looks like we'll need to hit up Oracle support and/or filter for dates between '0001-01-01' and '9999-12-31'
Pete H DA Morgan wrote: I suspect the problem is operator error rather than Oracle:
BIG SNIP> --
Hi Daniel; Your example seems to have little relevance to the problem I'm seeing. If you'll notice in my previous post, Oracle returns the row with a WHERE clause of date > '31-DEC-9999'" and shows a value of '16-APR-39' in the date that meets this criteria. I stand by my assertion that this certainly APPEARS to be a bug...
Pete H
1. What version
2. Dates, in Oracle, are not strings ... use TO_DATE
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.
--
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
DA Morgan wrote: 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.
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.
--
Knut Stolze
DB2 Information Integration Development
IBM Germany
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.
--
Knut Stolze
DB2 Information Integration Development
IBM Germany This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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...
|
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...
|
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...
|
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.
|
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...
| |
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...
|
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
|
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.
|
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...
|
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...
|
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,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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();...
|
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...
|
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
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |