I have to connect to a MSSQL database server recently upgraded to 2016 version.
I've read that i need freetds version 1.0 at minimum.(https://www.freetds.org/userguide/choos ... otocol.htm)
On the epel repository of Centos 6.10 i can find only freetds 0.91.
How i can install FreeTDS version 1 on Centos 6.10 ?
Install Freetds v1- Centos 6.10 - Connect to MSSQL 2016
Re: Install Freetds v1- Centos 6.10 - Connect to MSSQL 2016
Maybe time to start thinking about moving to a newer CentOS. CentOS 6 has less than one year of life left so you should be planning to migrate anyway. CentOS 7 has freetds 1.1.20 in EPEL, so does CentOS 8.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: Install Freetds v1- Centos 6.10 - Connect to MSSQL 2016
Move to Centos 7 or 8 means re-create from zero the server. At this time is not possible and not useful, in early 2021 the server will be replaced by external cloud service.
There is a way to install freetds V1 on centos 6.10 ?
There is a way to install freetds V1 on centos 6.10 ?
Re: Install Freetds v1- Centos 6.10 - Connect to MSSQL 2016
Some time ago, I wrote https://blog.remirepo.net/post/2016/09/ ... r-from-PHP
And didn't encounter any issue to connect (was a 2014 server) using freetds 0.95 at that time
So worth to be tried
Else, you will have to build it from sources...
And indeed, EL-6 is really old and not a good choice for "modern" stuff, like this one.
And didn't encounter any issue to connect (was a 2014 server) using freetds 0.95 at that time
So worth to be tried
Else, you will have to build it from sources...
And indeed, EL-6 is really old and not a good choice for "modern" stuff, like this one.
Re: Install Freetds v1- Centos 6.10 - Connect to MSSQL 2016
I've read your blog article. I'm using the option 1 of your article.
In the epel repository of centos 6 there is only freetds 0.91, not 0.95
The mssql version i have to connect with is 2016.
In the epel repository of centos 6 there is only freetds 0.91, not 0.95
The mssql version i have to connect with is 2016.
Re: Install Freetds v1- Centos 6.10 - Connect to MSSQL 2016
Ok. Forced a lower version of Mssql protocol and now i can connect to the database.
Using
I get the answer:
but i'm unable to do a simple select query:
i get nothing.. but the table is filled with many row.
How can i do a query ?
Using
Code: Select all
echo "+ Connection\n";
$pdo = new PDO("odbc:MSSQLServer", "user", "pass");
echo "+ Query\n";
$query = $pdo->query("SELECT @@version");
...
Code: Select all
Microsoft SQL Server 2016 (SP2-GDR) (KB4505220) - 13.0.5101.9 (X64) Jun 15 2019 23:15:58 Copyright (c) Microsoft Corporation Express Edition (64-bit) on Windows Server 2016 Standard 10.0 (Build 14393: ) (Hypervisor)
Code: Select all
$query = $pdo->query("SELECT * FROM table")
How can i do a query ?