pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Jens Sorensen (Intuii) <JensSorensen@Intuii.com>
To: pgsql-odbc@postgresql.org
Subject: Re: PSQLODBC.DLL - The (maximum) expected data length is 8000, while the returned data length is 9606.
Date: Mon, 27 Jul 2015 09:05:01 -0700
Message-ID: <55B656AD.6020800@aklaver.com> (raw)
In-Reply-To: <4854fc01d0c6cb$fc0c0010$f4240030$@Intuii.com>
References: <4854fc01d0c6cb$fc0c0010$f4240030$@Intuii.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>

On 07/25/2015 04:20 AM, Jens Sorensen (Intuii) wrote:
> 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.*

So what is the size limit, if any, in the SQL Server field.

>
> 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')
>
>  From ODBC setup:
>
>  From a “pg_dump” of schema:
>
> --
>
> -- Name: http_events; Type: TABLE; Schema: reports; Owner: postgres;
> Tablespace:
>
> --
>
> CREATE TABLE http_events (
>
>      event_id bigint NOT NULL,
>
>      time_stamp timestamp without time zone,
>
>      session_id bigint,
>
>      client_intf smallint,
>
>      server_intf smallint,
>
>      c_client_addr inet,
>
>      s_client_addr inet,
>
>      c_server_addr inet,
>
>      s_server_addr inet,
>
>      c_client_port integer,
>
>      s_client_port integer,
>
>      c_server_port integer,
>
>      s_server_port integer,
>
>      policy_id bigint,
>
>      username text,
>
>      hostname text,
>
>      request_id bigint,
>
>      method character(1),
>
>      uri text,
>
>      host text,
>
>      c2s_content_length bigint,
>
>      s2c_content_length bigint,
>
>      s2c_content_type text,
>
>      adblocker_blocked boolean,
>
>      adblocker_cookie_ident text,
>
>      adblocker_action character(1),
>
>      webfilter_reason character(1),
>
>      webfilter_category text,
>
>      webfilter_blocked boolean,
>
>      webfilter_flagged boolean,
>
>      sitefilter_reason character(1),
>
>      sitefilter_category text,
>
>      sitefilter_blocked boolean,
>
>      sitefilter_flagged boolean,
>
>      clam_clean boolean,
>
>      clam_name text,
>
>      virusblocker_clean boolean,
>
>      virusblocker_name text
>
> );
>
> Any advise appreciated!
>
> Jens
>


-- 
Adrian Klaver
adrian.klaver@aklaver.com


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



view thread (10+ messages)  latest in thread

Message-ID: <55B656AD.6020800@aklaver.com>
Permalink:  ../55B656AD.6020800@aklaver.com/
Also on:    postgresql.org/message-id/55B656AD.6020800@aklaver.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: adrian.klaver@aklaver.com, JensSorensen@Intuii.com
  Subject: Re: PSQLODBC.DLL - The (maximum) expected data length is 8000, while the returned data length is 9606.
  In-Reply-To: <55B656AD.6020800@aklaver.com>
  References: <4854fc01d0c6cb$fc0c0010$f4240030$@Intuii.com> <55B656AD.6020800@aklaver.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