rails-sqlserver / tiny_tds

TinyTDS - Simple and fast FreeTDS bindings for Ruby using DB-Library.
Other
606 stars 190 forks source link

String data trimming #471

Closed danilvoe closed 3 years ago

danilvoe commented 4 years ago

Environment

Operating System

No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 8.6 (jessie)
Release:    8.6
Codename:   jessie
Linux site-rg 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux

TinyTDS Version and Information gem tiny_tds (0.7.0) It was also checked on the gem version 2.1.2 \ 2.1.3.pre

FreeTDS Version

0.91

Description

Clipping occurs in fetch requests. Up to about 3,500 characters are returned to the client, and the rest are truncated.

danilvoe commented 4 years ago

similar situation in the next environment:

lsb_release -a; uname -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster
Linux dev-kotin.oaod.fkp 4.19.0-5-amd64 #1 SMP Debian 4.19.37-5+deb10u1 (2019-07-19) x86_64 GNU/Linux
tsql -C
Compile-time settings (established with the "configure" script)
                            Version: freetds v1.1.24
             freetds.conf directory: /usr/local/etc
     MS db-lib source compatibility: no
        Sybase binary compatibility: no
                      Thread safety: yes
                      iconv library: yes
                        TDS version: 7.3
                              iODBC: no
                           unixodbc: no
              SSPI "trusted" logins: no
                           Kerberos: no
                            OpenSSL: yes
                             GnuTLS: no
                               MARS: yes

But in this environment it was a trick to openssl

rbumg commented 4 years ago

What is the TEXTSIZE setting configured as in MSSQL? It's recommended to set the following settings:

SET ANSI_DEFAULTS ON

SET QUOTED_IDENTIFIER ON
SET CURSOR_CLOSE_ON_COMMIT OFF
SET IMPLICIT_TRANSACTIONS OFF
SET TEXTSIZE 2147483647
SET CONCAT_NULL_YIELDS_NULL ON
danilvoe commented 4 years ago

What is the TEXTSIZE setting configured as in MSSQL? It's recommended to set the following settings:

SET ANSI_DEFAULTS ON

SET QUOTED_IDENTIFIER ON
SET CURSOR_CLOSE_ON_COMMIT OFF
SET IMPLICIT_TRANSACTIONS OFF
SET TEXTSIZE 2147483647
SET CONCAT_NULL_YIELDS_NULL ON

Fine! It works. I'll try on a large sample of data and close the issue if there are no comments.

It is unfortunate that I did not see this in the description, although I read it several times. :(

aharpervc commented 3 years ago

Closing this, since it looks like your question is answered