Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lgDEZ-0004xf-C1 for pgsql-odbc@arkaria.postgresql.org; Mon, 10 May 2021 21:14:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lgDEY-0007k7-8X for pgsql-odbc@arkaria.postgresql.org; Mon, 10 May 2021 21:14:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lgDEX-0007jx-Sg for pgsql-odbc@lists.postgresql.org; Mon, 10 May 2021 21:14:34 +0000 Received: from mail-eopbgr660084.outbound.protection.outlook.com ([40.107.66.84] helo=CAN01-QB1-obe.outbound.protection.outlook.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lgDEU-0005db-R3 for pgsql-odbc@lists.postgresql.org; Mon, 10 May 2021 21:14:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NXe8G1CZxsHnSVnWsmJGXbHfdOAf+HgYJwIpcdnln8vjQMprhIznbKkc8UD5QGRNb1RPpOMRqZQsRZqFt64TFvI1z69cwKxfQmia7q8XL8o4bT8z/SEUdF4LPD2YqyUgy2WkycHDxSJ3AO2+SeWY+TdttfGXkBLv2G31waDTpyNnn49lxTNM7cTQdMqhfVcj2iGyuukK8NUXCcMQUIkV+q2bVv/NVjZ/RLrl5Se8FhG3T/niFS5HmkQA4lpy1W8+hcZF2BvBR6i+1FJM5yIdJZL3dE3OeIHC56SZ8Xmv2RJNQdaX4K3V8e+dhnIjajGP04/mJ3nqh9ckVzimkHRvKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yGo3xtu+wjR3BToHhcEF5mAVd8IVCV3VXmervhjSP6c=; b=XU80q1kXWyxZ3MgOOYki9YXfMfPmHrEOFpfJ39tlJkGLUqp5ZjQkEvEptz0O/JmCdoSxCJVy6TtfjIQABnK31fgRzGRlWM8QKa+z9jKahRSQr9yvWUWsYTELuwQU8LneeJAqcTdksb8/BBNBfJvmCQIiofMBcBHsF67c5VFjHrS/R3WApkEPMQtEAJNpy1pjktOUu3T29lXLTT+4wOYKe9IX1FC27qOLKkPxcir1xhztxgzffQVilbP/+TNdAA7tDassQvMroYDmu2EjWQpMX84uvQPHCe5Rjnct7eLwUkIroSDkC5WRv+Zu5NcVm3xGj0WFwOF2JhllfP9rlwMKpA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=axper.com; dmarc=pass action=none header.from=axper.com; dkim=pass header.d=axper.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axper.onmicrosoft.com; s=selector2-axper-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yGo3xtu+wjR3BToHhcEF5mAVd8IVCV3VXmervhjSP6c=; b=iisZdQuKluR+a3K9RLxj1x5kbYtXrlP8qdfrFqPFUvI5MohrNOj+Y+4ZgpoCi6C62u69CEL0rt0bSNE2OMAd68yuV+KFHANXH71b4+pcM9Q9qnlOJ0WfghG6IoNNvufyZqiwIxcTqXmPwZeEkUCVkbkYo+cEgz6mjiW08J/axu4= Received: from YQBPR0101MB1299.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:f::28) by QB1PR01MB2644.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:36::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.31; Mon, 10 May 2021 21:14:27 +0000 Received: from YQBPR0101MB1299.CANPRD01.PROD.OUTLOOK.COM ([fe80::e8f4:91d:806b:8ef5]) by YQBPR0101MB1299.CANPRD01.PROD.OUTLOOK.COM ([fe80::e8f4:91d:806b:8ef5%5]) with mapi id 15.20.4108.031; Mon, 10 May 2021 21:14:27 +0000 From: David Parenteau To: "pgsql-odbc@lists.postgresql.org" Subject: ODBC Calling Fill - Unexptected closed connection after 2 hours Thread-Topic: ODBC Calling Fill - Unexptected closed connection after 2 hours Thread-Index: AQHXReAepyYLSWq2iEmmXGx+oKB2JA== Date: Mon, 10 May 2021 21:14:27 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: lists.postgresql.org; dkim=none (message not signed) header.d=none;lists.postgresql.org; dmarc=none action=none header.from=axper.com; x-originating-ip: [208.88.110.10] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fe771a19-a44b-4dff-8ad3-08d913f89828 x-ms-traffictypediagnostic: QB1PR01MB2644: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: uD74L28Zjghwn1Zgo6q1xpGTzx5f6kI6uJ9CqKZxzXszyCVYmYL0waua8a0GcX3S8y46cTGVPUuNiPWY/nhZOxdwlnh2VbZqScaRkeX/SwKk9rPYnyVcGryDd5KmRoMsZR7IDmsV8uYui68tW9PTwHVLN+b5jToP7Rr4l0OIMMqV9Xw6NpHQbEPXMJYEpojkEXzEQOtOoMDUo48F4TZx9cDcCI/J8ZQb4EosUi19gMHekQJGU83Kca5tNaKBZT/ezt2ofpvxSe+Cx1pFWi7vMTYniGsny8KVINsLl4UO4i+3nf3UGcJeNtMB+WGxpibe5XiPfSzbYfI0K5HT0p92Gw6Q21uFNJGFl/vK1MXW9Aq4rDUQtuf5kw6bYsXKKtp9lZuS4NF7f1VjgT/3627w8fn+idIp9VNxfD5jD224DvSw6XG6IfNpRCKOxpu5AfKLLfJyNT2LY8ygaGQPcmle5DgXclUyaAznb2160dYcMTizfZpUJBAjX/H7qV+puvWnE6vDznvw4q+SiYCLg0Gwba9Y2IHtLFpE5by2Kk4bFrN45B4ECEW1UfECwPfJaQtaRYLJKByx8L3YBObqxttzGP8VpLQXA0FXozi7PQBnML0= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:YQBPR0101MB1299.CANPRD01.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(136003)(346002)(376002)(396003)(39850400004)(366004)(83380400001)(66446008)(64756008)(66946007)(66476007)(6506007)(9686003)(55016002)(66556008)(76116006)(38100700002)(7696005)(122000001)(19627405001)(33656002)(8676002)(2906002)(8936002)(186003)(86362001)(52536014)(5660300002)(316002)(478600001)(71200400001)(26005)(6916009);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: =?iso-8859-1?Q?smUafI/dO7F02/keK6TYS2ncW7Pr/lEm6XdFezyTGPDh/e6ZDIwzlxe2cZ?= =?iso-8859-1?Q?lNDEBXSl3SOEF4YPJQDcR/2LlMrP1J851sOAi03+w5nwPgHFrt6GJZWpJ6?= =?iso-8859-1?Q?rMHSi0XtZD+fCOu+2E0JVVZdssYX2ElX3S1T7cP4Px1uY2hUhalVbVFhEr?= =?iso-8859-1?Q?6CpHVZxbZ2QJexQGL8ea7/GXFXhoI2noUrGSEiYe2medFG0H47vlBfV7NO?= =?iso-8859-1?Q?eRgdxBUkizdk/e6e+cg+q2b60pxdsOTiMz3TlF+3feNdLKLvDfKZunDnSV?= =?iso-8859-1?Q?eIJj5KKMc1ZU6OLlpFCE8WHfrew1mbB+eQT/VI/dXn3ZluLuqbZPMZZK5m?= =?iso-8859-1?Q?rA14rfCSZpgDK91P5aLgaPW7MtgJoU2inN5/E61mG8uqcT8KtwNx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2fgJHldu9tYpEIjcCExaJEiwOJnkVNHxd8235M3vS+Eh?= =?iso-8859-1?Q?JE0w7AjNXnn6cyM+9CjykCRE4+N975Ci+pLRzslMI+sLD6E=3D?= Content-Type: multipart/alternative; boundary="_000_YQBPR0101MB12994B270FD41153B2FF940CC2549YQBPR0101MB1299_" MIME-Version: 1.0 X-OriginatorOrg: axper.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: YQBPR0101MB1299.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: fe771a19-a44b-4dff-8ad3-08d913f89828 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 May 2021 21:14:27.4577 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 25a5f507-f32a-4534-ba73-9466da238c43 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Gq9LT3mpd8YimDypjSd8qm+nNmKqsrU+z+MVOeB22Gud5zkyhK9/xmVnjInU2eWhH5dGicoES64iQXO7TQ09Bg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: QB1PR01MB2644 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --_000_YQBPR0101MB12994B270FD41153B2FF940CC2549YQBPR0101MB1299_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Using PostgreSQL 12.3 (Ubuntu 12.3-1.pgdg18.04+1) on x86_64-pc-linux-gnu, c= ompiled by gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, 64-bit I use driver PostgresSQL Unicode(x64) version 13.00.00.00 I have a query that is executed through an ODBC connection in a Powershell = 5.1 script. I use the Fill() method to retreive about 3500 records daily. W= hen the script works, it takes 2-5 minutes to execute and retrieve data. Probleme is that the script "fails" half of the time approx. When this occu= rs, the powershell script does stop only after 2h and 30 seconds. We double checked the postgres logs and when this occurs, we see that the q= uery successfully completed within 6 minutes always. I don't know what to = look for. any Idea? Below is the error got: Executed as user: NT Service\SQLSERVERAGENT. A job step received an error a= t line 94 in a PowerShell script. The corresponding line is '(New-Object sy= stem.Data.odbc.odbcDataAdapter($cmd)).fill($ds) | out-null '. Correct the = script and reschedule the job. The error information returned by PowerShell= is: 'Exception calling "Fill" with "1" argument(s): "The connection has be= en disabled." '. Process Exit Code -1. Not too familiar with postgreSQL. Thanks! --_000_YQBPR0101MB12994B270FD41153B2FF940CC2549YQBPR0101MB1299_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Using PostgreSQL 12.3 (Ubuntu 12.3-1.pgdg18.04+1) on x86_64-pc-linux-g= nu, compiled by gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, 64-bit
I use driver PostgresSQL Unicode(x64)  version 13.00.00.00


I have a query that is executed through an ODBC connection in a Powershell = 5.1 script. I use the Fill() method to retreive about 3500 records daily. W= hen the script works, it takes 2-5 minutes to execute and retrieve data.
Probleme is that the script "fails" half of the time approx. When= this occurs, the powershell script does stop only after 2h and 30 seconds.=  
We double checked the postgres logs and when this occurs, we see that the q= uery successfully completed within 6 minutes always.  I don't know wha= t to look for. any Idea?

Below is the error got:

Executed as user: NT Service\SQLSERVERAGENT. A job step received an error a= t line 94 in a PowerShell script. The corresponding line is '(New-Object sy= stem.Data.odbc.odbcDataAdapter($cmd)).fill($ds) | out-null  '. Correct= the script and reschedule the job. The error information returned by PowerShell is: 'Exception calling "Fill= " with "1" argument(s): "The connection has been disabl= ed."  '.  Process Exit Code -1.

Not too familiar with postgreSQL.

Thanks!
--_000_YQBPR0101MB12994B270FD41153B2FF940CC2549YQBPR0101MB1299_--