freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
[freetds] FreeTDS with read-only intent = yes on RHEL 6.6
- From: Rick Knowler <rick.knowler AT fidessa.com>
- To: "freetds AT lists.ibiblio.org" <freetds AT lists.ibiblio.org>
- Subject: [freetds] FreeTDS with read-only intent = yes on RHEL 6.6
- Date: Mon, 3 Oct 2016 18:52:04 +0000
Hi
I'm trying to use FreeTDS to use read-only intent. I should be using the
server UKWDC-RUATSDB2, but while using FreeTDS it only connects to
UKWDC-RUATSDB1 which is the master server.
I would like to know have I misconfigured something? Or is there a bug which
is fixed in later versions? Or should this work and there is a setting
missing in Microsoft SQL server?
While using the Microsoft driver
(https://msdn.microsoft.com/en-us/library/hh568449(v=sql.110).aspx) with odbc
this works:
#isql -v TDS ghood password
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> select @@SERVERNAME
+---------------------------------------------------------------------------------------------
|
+---------------------------------------------------------------------------------------------
| UKWDC-RUATSDB2
As you can see it's select server 2. When using FreeTDS and ODBC I get the
following:
#isql -v TDS ghood password
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> select @@SERVERNAME;
+---------------------------------------------------------------------------------------------------------------------------------+
|
|
+---------------------------------------------------------------------------------------------------------------------------------+
| UKWDC-RUATSDB1
As you can see it's picked server 1, the primary. Here are my config files:
freetds.conf
[RemedyUAT]
host = 192.168.113.83
port = 1433
tds version = 7.4
database = RemedyUAT
read-only intent = yes
dump file = /fidessa/fidmgr/ghoodcol/scripts/rickTDS.log
odbc.ini:
[TDS]
Driver = TDS
Servername = RemedyUAT
TDS_Version = 7.4
ReadOnly = Yes
ApplicationIntent = ReadOnly
odbcinst.ini
[TDS]
Description = MsSQL connection
Driver = /usr/lib64/libtdsodbc.so.0
I can see this config being picked up by running osql (it fails at the IP
part, but if I enter in the hostname and configure DNS, it goes into isql
with no further information):
#osql -S TDS -U ghood -P password
checking shared odbc libraries linked to isql for default directories...
strings: '': No such file
trying /tmp/sqlH ... no
trying /tmp/sqlL ... no
trying /etc ... OK
checking odbc.ini files
reading /opt/fidmgr/.odbc.ini
[TDS] found in /opt/fidmgr/.odbc.ini
found this section:
[TDS]
Driver = TDS
Servername = RemedyUAT
TDS_Version = 8.0
ReadOnly = Yes
ApplicationIntent = ReadOnly
looking for driver for DSN [TDS] in /opt/fidmgr/.odbc.ini
found driver line: " Driver = TDS"
driver "TDS" found for [TDS] in .odbc.ini
found driver named "TDS"
"TDS" is not an executable file
looking for entry named [TDS] in /etc/odbcinst.ini
found driver line: " Driver = /usr/lib64/libtdsodbc.so.0"
found driver /usr/lib64/libtdsodbc.so.0 for [TDS] in odbcinst.ini
/usr/lib64/libtdsodbc.so.0 is an executable file
Using ODBC-Combined strategy
DSN [TDS] has servername "RemedyUAT" (from /opt/fidmgr/.odbc.ini)
/opt/fidmgr/.freetds.conf is a readable file
looking for [RemedyUAT] in /opt/fidmgr/.freetds.conf
found this section:
[RemedyUAT]
host = 192.168.113.83
port = 1433
tds version = 7.4
database = RemedyUAT
read-only intent = yes
dump file = /fidessa/fidmgr/ghoodcol/scripts/rickTDS.log
looking up hostname for ip address 192.168.113.83
FreeTDS was installed from the repositry we have configure, here are the
compile options:
#tsql -C
Compile-time settings (established with the "configure" script)
Version: freetds v0.91
freetds.conf directory: /etc
MS db-lib source compatibility: yes
Sybase binary compatibility: yes
Thread safety: yes
iconv library: yes
TDS version: 4.2
iODBC: no
unixodbc: yes
SSPI "trusted" logins: no
Kerberos: yes
I know I've pasted a lot of information here. If I've missed anything please
let me know. Also I'm sorry if I've pasted too much.
Thanks
Rick
Rick Knowler
Production Services
Fidessa<http://www.fidessa.com/> | Tel: +1 (212)520 3465| Mob: +1 (917)
409-8507 | rick.knowler AT fidessa.com<mailto:rick.knowler AT fidessa.com>
[Description: Description: Description: Description:
http://www.services.fidessa.com/banneradverts/email-signature-logos/Fidessa-Logo-Email-Signature-green.png]<http://www.fidessa.com/>
[http://www.services.fidessa.com/htmlemails/disclaimer/_images/us-20th-horz.jpg]
This message is intended only for the stated addressee(s) and may be
confidential. Access to this email by anyone else is unauthorized. Any
opinions expressed in this email do not necessarily reflect the opinions of
Fidessa. Any unauthorized disclosure, use or dissemination, either whole or
in part is prohibited. If you are not the intended recipient of this message,
please notify the sender immediately. This email does not form a contract and
we do not represent that it is complete, accurate, uncorrupted or free of
viruses and it should not be relied upon as such.
- [freetds] FreeTDS with read-only intent = yes on RHEL 6.6, Rick Knowler, 10/03/2016
Archive powered by MHonArc 2.6.24.