pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jens Sorensen (Intuii) <JensSorensen@Intuii.com>
To: pgsql-odbc@postgresql.org
Subject: PSQLODBC.DLL - The (maximum) expected data length is 8000, while the returned data length is 9606.
Date: Sat, 25 Jul 2015 04:20:54 -0700
Message-ID: <4854fc01d0c6cb$fc0c0010$f4240030$@Intuii.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>

Hello,

 

I’m stuck. 

 

I’m trying to import data from PostgreSQL running on an Untangle appliance (Untangle.com) to SQL Server, but can’t seem to overcome an issue with the following error:

 

Msg 7347, Level 16, State 1, Line 7

OLE DB provider 'MSDASQL' for linked server '(null)' returned data that does not match expected data length for column '[MSDASQL].uri'. The (maximum) expected data length is 8000, while the returned data length is 9606.

 

Even after increasing the MaxLongVarcharSize as in the following select statement, I still get this same error with the value of 8000. 

 

select * from openrowset('MSDASQL', 'Dsn=PostgreSQL35W;MaxLongVarcharSize=16000;', 'select * from reports.http_events')

 

I’ve also tried this one:

 

select * from openrowset('MSDASQL', 'Driver=PostgreSQL Unicode(x64);uid=postgres;Server=10.5.55.1;port=5432;database=uvm;MaxLongVarChar=16000;', 

 

‘SELECT event_id

      ,time_stamp

      ,session_id

      ,client_intf

      ,server_intf

      ,c_client_addr

      ,s_client_addr

      ,c_server_addr

      ,s_server_addr

      ,c_client_port

      ,s_client_port

      ,c_server_port

      ,s_server_port

      ,policy_id

      ,username

      ,hostname

      ,request_id

      ,method

      ,uri

      ,host

      ,c2s_content_length

      ,s2c_content_length

      ,s2c_content_type

      ,adblocker_blocked

      ,adblocker_cookie_ident

      ,adblocker_action

      ,webfilter_reason

      ,webfilter_category

      ,webfilter_blocked

      ,webfilter_flagged

      ,sitefilter_reason

      ,sitefilter_category

      ,sitefilter_blocked

      ,sitefilter_flagged

      ,clam_clean

      ,clam_name

      ,virusblocker_clean

      ,virusblocker_name

from reports.http_events')

 

view thread (10+ messages)  latest in thread

Message-ID: <4854fc01d0c6cb$fc0c0010$f4240030$@Intuii.com>
Permalink:  ../4854fc01d0c6cb$fc0c0010$f4240030$@Intuii.com/
Also on:    postgresql.org/message-id/4854fc01d0c6cb$fc0c0010$f4240030$@Intuii.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: JensSorensen@Intuii.com
  Subject: Re: PSQLODBC.DLL - The (maximum) expected data length is 8000, while the returned data length is 9606.
  In-Reply-To: <4854fc01d0c6cb$fc0c0010$f4240030$@Intuii.com>
  References: <4854fc01d0c6cb$fc0c0010$f4240030$@Intuii.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox