From: | "Jens Sorensen (Intuii)" <JensSorensen(at)Intuii(dot)com> |
---|---|
To: | <pgsql-odbc(at)postgresql(dot)org> |
Subject: | PSQLODBC.DLL - The (maximum) expected data length is 8000, while the returned data length is 9606. |
Date: | 2015-07-25 11:20:54 |
Message-ID: | 4854fc01d0c6cb$fc0c0010$f4240030$@Intuii.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-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')
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
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2015-07-27 16:05:01 | Re: PSQLODBC.DLL - The (maximum) expected data length is 8000, while the returned data length is 9606. |
Previous Message | Heikki Linnakangas | 2015-07-24 19:53:35 | Re: When will you be adding ISC_REQ_MUTUAL_AUTH to the ODBC dwSSPIFlags variable? |