Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZJkgx-0002YC-BC for pgsql-odbc@arkaria.postgresql.org; Mon, 27 Jul 2015 15:51:51 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZJkgw-0001xP-Sl for pgsql-odbc@arkaria.postgresql.org; Mon, 27 Jul 2015 15:51:50 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZIxVU-0004bu-Ni for pgsql-odbc@postgresql.org; Sat, 25 Jul 2015 11:20:45 +0000 Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.228] helo=cdptpa-oedge-vip.email.rr.com) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZIxVN-0006xB-7w for pgsql-odbc@postgresql.org; Sat, 25 Jul 2015 11:20:43 +0000 Received: from [66.27.108.254] ([66.27.108.254:50151] helo=NORTHPENNSYLVAN.intuii.local) by cdptpa-oedge01 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id 60/72-18614-30173B55; Sat, 25 Jul 2015 11:20:36 +0000 Received: from NewCalifornia (66.27.108.254) by NORTHPENNSYLVAN.intuii.local (10.5.0.120) with Microsoft SMTP Server id 14.1.438.0; Sat, 25 Jul 2015 04:20:18 -0700 From: "Jens Sorensen (Intuii)" To: 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> MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_NextPart_000_4854FD_01D0C691.4FB0AA80" X-Mailer: Microsoft Outlook 15.0 Thread-Index: AdDGyUl97guhwC6nTm6BMx1g0aJuQA== Content-Language: en-us X-Originating-IP: [66.27.108.254] X-RR-Connecting-IP: 107.14.168.118:25 X-Cloudmark-Score: 0 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org ------=_NextPart_000_4854FD_01D0C691.4FB0AA80 Content-Type: multipart/alternative; boundary="----=_NextPart_001_4854FE_01D0C691.4FB0AA80" ------=_NextPart_001_4854FE_01D0C691.4FB0AA80 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello, =20 I=E2=80=99m stuck.=20 =20 I=E2=80=99m trying to import data from PostgreSQL running on an Untangle = appliance (Untangle.com) to SQL Server, but can=E2=80=99t seem to = overcome an issue with the following error: =20 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. =20 Even after increasing the MaxLongVarcharSize as in the following select = statement, I still get this same error with the value of 8000.=20 =20 select * from openrowset('MSDASQL', = 'Dsn=3DPostgreSQL35W;MaxLongVarcharSize=3D16000;', 'select * from = reports.http_events') =20 I=E2=80=99ve also tried this one: =20 select * from openrowset('MSDASQL', 'Driver=3DPostgreSQL = Unicode(x64);uid=3Dpostgres;Server=3D10.5.55.1;port=3D5432;database=3Duvm= ;MaxLongVarChar=3D16000;',=20 =20 =E2=80=98SELECT 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') =20