sql server extract - corrupt data when using an odbc stage
Posted: Tue Aug 24, 2010 5:47 pm
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
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