Reading SQL Server XML data type

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
ecclesr
Premium Member
Premium Member
Posts: 260
Joined: Sat Apr 05, 2003 7:12 pm
Location: Australia

Reading SQL Server XML data type

Post by ecclesr »

On a DataStage Windows platform, a team memeber recently developed two jobs
1) Extracts xml files and via XML Hierarchical Data stage load into into a SQL server table where one of the target colums is defined as datatype XML in SQL Server (write from Datastage as SQL type LongNVarChar)

2) Read data from the SQl Server table, xml columns is read as LongNVarChar and witten to a SQL server table as LongNVarChar

Job was running without issue on the windows platform

The person has now migrated the two job to a new Linux DataStage installation

when the second job (Read and writes to SQL server via odbc) is run in linux environment we get the following warning

terminate called after throwing an instance of 'APT_BadAlloc'

If I remove the column associated with the data type XML - the job run without issues

Has anyone had this issue in a Linux/SQL Server installation and resolved the problem

Thanking you all in advance
ecclesr
Premium Member
Premium Member
Posts: 260
Joined: Sat Apr 05, 2003 7:12 pm
Location: Australia

Post by ecclesr »

Since I raised this issue, I have had no feed back.

With no initial feedback, we raised a PMR. The PMR to date has not resulted in a solution.

Have any users had such a problem working with the XML Hierarchical Data stage


Thanking you all in advance
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So... no indication from IBM of a bug or possible bug in that version of the stage? Are they at least still working it with you?
-craig

"You can never have too many knives" -- Logan Nine Fingers
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Does any other datatype work? That would be my only guess. Try LongVarChar.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
boxtoby
Premium Member
Premium Member
Posts: 138
Joined: Mon Mar 13, 2006 5:11 pm
Location: UK

Post by boxtoby »

I have a job which reads an xml column from an SQL Server table successfully on Red Hat Linux.

However, I had to add the following environment variables to the job:

$APT_DEFAULT_TRANSPORT_BLOCK_SIZE
$APT_PHYSICAL_DATASET_BLOCK_SIZE

and set them both to 3000000 (3,000,000)

Hope that helps.

Bob.
Bob Oxtoby
ecclesr
Premium Member
Premium Member
Posts: 260
Joined: Sat Apr 05, 2003 7:12 pm
Location: Australia

Post by ecclesr »

I have tried
$APT_DEFAULT_TRANSPORT_BLOCK_SIZE
$APT_PHYSICAL_DATASET_BLOCK_SIZE

This did not resolve the issue.
ecclesr
Premium Member
Premium Member
Posts: 260
Joined: Sat Apr 05, 2003 7:12 pm
Location: Australia

Post by ecclesr »

Work Around

I have found a work around

I changed the SQL server datatype from XML to varchar(max). The odbc is read ad SQL Type LongNVarChar length 3741823

I will continue continue testing this work around

Thanking you all for you input
pbttbis
Premium Member
Premium Member
Posts: 36
Joined: Thu Dec 11, 2014 3:30 am
Location: South Africa
Contact:

Post by pbttbis »

I managed to get the SQL server type varchar(max) to be read into DataStage LongNVarchar by making use of the following ODBC driver:

Driver=/opt/IBM/InformationServer/Server/branded_odbc/lib/VMsqls00.so
Description=DataDirect SQL Server Native Wire Protocol

I was using:

Driver=/opt/IBM/InformationServer/Server/branded_odbc/lib/VMmsss00.so
Description=DataDirect SQL Server Wire Protocol driver

Where I was having same/similar issues as above. Hope this helps.
PBT TBIS Consultant
Post Reply