Hello Everyone,
We are connecting to a sql server database with datastage for the first time. The odbc configuration is complete and we are communicating with the database from parallel jobs. When extracting data from a sql server table(via an odbc stage), we noticed that some of the data in nvarchar columns is corrupted in the job(extra garbage after the data). Looks fine in the database, but not in the job. Codeset difference could be to blame. We tried setting datastage codeset to unicode, but still getting bad data.
We are extracting an integer and an nvarchar(see resulting data below):
Data in database:
ID LAST_NM
345 Kraska
Extracting same data in datastage and dumping to sequential file:
ID LAST_NM
345[null][null][null][sub][esc] Kraska[null]T_NM[null][null]
It appears as if part of the column name(T_NM) is in the data. When extracting multiple records, bad data appears to bleed down multiple recs.
DRS stage seems to work fine.
Any ideas appreciated.
Thx
Robert
sql server extract - corrupt data when using an odbc stage
Moderators: chulett, rschirm, roy
sql server extract - corrupt data when using an odbc stage
We don't see things as they are;
We see them as we are.
We see them as we are.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Can you read the data successfully if you change the data type to VarChar - possibly with maximum length set up to four times the NVarChar column length specification?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.