Timestamps Oracle OCI to OLE/DB??

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
zbethem
Charter Member
Charter Member
Posts: 19
Joined: Tue Mar 14, 2006 2:12 pm
Contact:

Timestamps Oracle OCI to OLE/DB??

Post by zbethem »

Hi all. I'm finding some interesting behavior around timestamps. I've defined columns on both the Oracle and SQLServer side as 'Timestamp'.

My job is as follows:

Code: Select all

OCI-->Trans-->OLE/DB
What I'm seeing is as follows:
1. null dates in Oracle are trying to be written as '0000/00/00 00:00:00' in SQLServer
2. inconsistency in passing the actual date value; oracle values of '2006-05-12 00:00' are mysteriously translated to '05/11/2006 00:00:00'

Can anyone out there recommend any techniques to use regarding this? I've tried converting to the internal Date format, but that didn't seem to help.

Thanks in advance.
Loving the Micro$oft HRESULT errors.. makes everything so obvious...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

For debugging purposes, put a Sequential File stage between the Transformer stage and the OLEDB stage. What format gets written into the text file? This should also isolate where the problem is occurring.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
zbethem
Charter Member
Charter Member
Posts: 19
Joined: Tue Mar 14, 2006 2:12 pm
Contact:

Post by zbethem »

Thanks Ray. I've resolved the issue #2, it was me javascript:emoticon(':roll:')
Rolling Eyes concentrating on the HRESULT error versus looking at the data.

That being said, however, the first issue is still around. Null Oracle date columns are still trying to be written as '0000/00/00 00:00:00'. I'm seeing this in the job's log in Director. The sequential file looks like the Oracle side, Null for the date column.

For reference, the job now is:

Code: Select all

OCI-->Trans-->SeqFile-->Trans-->OLE/DB
Is there an easier way to lookup these HRESULT errors that I don't know about? They seem to be cryptic versus those nice ORA- or DB2 error codes.

Thanks again.
zbethem
Charter Member
Charter Member
Posts: 19
Joined: Tue Mar 14, 2006 2:12 pm
Contact:

Post by zbethem »

Just wanted to update the forum...

So things seem to be working fine now. I was getting tripped up in the HRESULT error message when the job executed. I've since found out that the error was being caused by data issues in the source. For some reason, the error message reporting the data values was showing null dates as '00/00/0000', but things are inserted properly now that the data issues are resolved.

Thanks for your help... again.
Post Reply