Oracle date format
Posted: Wed Dec 05, 2007 12:36 pm
We recently moved from DB2 (Mainframe) to Oracle 9i for one of our database. Since DB2 date datatype represents YYYY-MM-DD, in datastage the corresponding field was char(10). As part of the move to Oracle from DB2 we needed to change a lot of jobs to accomodate oracle date value (YYYY-MM-DD HH:MM:SS), except in couple of jobs where the datatype for a date field was left at char(10).
In the development environment no jobs aborted inspite of this anomaly. In the pre-production the jobs did not abort either. However, in production these 2 jobs aborted with the error "OCI has fetched tuncated data".
On analyzing the issue, we found that in development the NLS_DATE_FORMAT (from V$Parameter) was set to YYYY-MM-DD. So the char(10) defined in the 2 datastage jobs was long enough to hold the data. In production, NLS_DATE_FORMAT was set to YYYY-MM-DD HH:MI:SS. We chnaged to SQL statement to get the first 10 characters to make the jobs work.
My question is - I checked the NLS_DATE_FORMAT value in pre-production and it was same as in production. Yet the jobs never failed in pre-prod. What other areas I need to look at to find the reason for jobs "NOT FAILING" in pre-production.
I will appreciate you help. Thanks.
Bhusan
In the development environment no jobs aborted inspite of this anomaly. In the pre-production the jobs did not abort either. However, in production these 2 jobs aborted with the error "OCI has fetched tuncated data".
On analyzing the issue, we found that in development the NLS_DATE_FORMAT (from V$Parameter) was set to YYYY-MM-DD. So the char(10) defined in the 2 datastage jobs was long enough to hold the data. In production, NLS_DATE_FORMAT was set to YYYY-MM-DD HH:MI:SS. We chnaged to SQL statement to get the first 10 characters to make the jobs work.
My question is - I checked the NLS_DATE_FORMAT value in pre-production and it was same as in production. Yet the jobs never failed in pre-prod. What other areas I need to look at to find the reason for jobs "NOT FAILING" in pre-production.
I will appreciate you help. Thanks.
Bhusan