On Linux DG4MSQL Does Not Return Columns Of Datatype Nvarchar With Length 1334 or Longer (Doc ID 1108188.1)

Last updated on JANUARY 18, 2017

Applies to:

Oracle Database Gateway for SQL Server - Version 11.1.0.7 and later
Linux x86-64
Linux x86

Symptoms


Using DG4MSQL 11.2.0.1 running on Linux x86-64 it is not possible to select from a SQL*Server NVARCHAR column defined as 1334 or longer.
A column 1333 or less in length can be selected.
Using DG4MSQL 11.2.0.1 running on Windows then NVARCHAR columns up to 2000 length can be selected.

To illustrate the problem, create tables in SQL*Server -


create table [dbo].[test_nvarchar2] (col1 char(5), col2 nvarchar(1333))
insert into test_nvarchar2 values ('Bill', 'Bill nvarchar')

create table [dbo].[test_nvarchar3] (col1 char(5), col2 nvarchar(1334))
insert into test_nvarchar3 values ('Bill', 'Bill nvarchar')



Using 11.1 or 11.2 RDBMS create a database link to the DG4MSQL connecting to the SQL*Server database and issue the selects from the SQL*Server tables -


SQL> desc "dbo"."test_nvarchar2"@dg4msql_112_linux
Name Null? Type
----------------------------------------- -------- -----------------

col1 CHAR(5)
col2 NVARCHAR2(1333)

SQL> desc "dbo"."test_nvarchar3"@dg4msql_112_linux
Name Null? Type
----------------------------------------- -------- -----------------

col1 CHAR(5)




SQL> select * from "dbo"."test_nvarchar2"@dg4msql_112_linux  ;

col1
-----
col2
---------------------------------------------------------------

Bill
Bill nvarchar




SQL> select * from "dbo"."test_nvarchar3"@dg4msql_112_linux  ;

col1
-----
Bill

SQL>



Using the same RDBMS create a database link to DG4MSQL running on Windows to the same SQL*Server database and run the same selects -


SQL> desc "dbo"."test_nvarchar2"@dg4msql_112_win
Name Null? Type
----------------------------------------- -------- -----------------

col1 CHAR(5)
col2 NVARCHAR2(1333)

SQL> desc "dbo"."test_nvarchar3"@dg4msql_112_win
Name Null? Type
----------------------------------------- -------- -----------------

col1 CHAR(5)
col2 NVARCHAR2(1334)



SQL> select * from "dbo"."test_nvarchar2"@dg4msql_112_win ;

col1
-----
col2
---------------------------------------------------------------

Bill
Bill nvarchar

SQL> select * from "dbo"."test_nvarchar3"@dg4msql_112_win ;

col1
-----
col2
---------------------------------------------------------------

Bill
Bill nvarchar

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms