connecting from red hat 6.4 to MSSQL 2012 - sql-server

I am trying to connect from my red hat 6.4 to a MSSQL 2012 server to monitor some parameters.
Long story short:
I have Icinga 1.9.4 configured on that Red Hat and I am monitoring lots of hosts/services.
Also successfully monitoring MSSQL 2000, 2005, 2008, 2008 R2 with check_mssql_health (and freetds) from labs.consol.de
The problem appears when trying to monitor MSSQL 2012, plugin cannot connect to it.
Asked my MSSQL admin to double check that everything is configured OK, he confirmed that, he also successfully connected to MSSQL 2012 from another working MSSQL 2008.
So, I thought, I should at least make a connection from anything (perl, isql, tsql) to see if actually is working and that I can get some data from that server but nothing can connect.
Perl/isql/tsql cannot connect also to working MSSQL servers (the ones that I am successfully monitoring with Icinga / check_mssql_health) so I am guessing the problem is my linux setup.
I could (desperately) use your help in finding out what the problem is.
I do not know if check_mssql_health is compatible with MSSQL 2012 server, but, if I could make a successful connection from Perl to that MSSQL 2012, I should be able to get what I need with the help of Perl.
Some details of my setup:
perl -MDBI -e 'DBI->installed_versions;'
Perl : 5.010001 (x86_64-linux-thread-multi)
OS : linux (2.6.18-398.el5)
DBI : 1.633
DBD::mysql : 4.013
DBD::Sybase : 1.15
DBD::Sponge : 12.010003
DBD::Proxy : 0.2004
DBD::Oracle : 1.74
DBD::ODBC : 1.50
DBD::Gofer : 0.015327
DBD::File : 0.44
DBD::ExampleP : 12.014311
DBD::DBM : 0.08
cat /etc/odbc.ini
[SASSQL26DEV]
Driver = FreeTDS
Description = MSSQL database pt serverul meu
Trace = Yes
TraceFile = /usr/local/src/traceFile.log
# Servername corresponds to the section in freetds.conf
Servername = SASSQL26DEV
Database = tempdb
#port = 1433
cat /etc/odbcinst.ini
[PostgreSQL]
Description = ODBC for PostgreSQL
Driver = /usr/lib/psqlodbc.so
Setup = /usr/lib/libodbcpsqlS.so
Driver64 = /usr/lib64/psqlodbc.so
Setup64 = /usr/lib64/libodbcpsqlS.so
FileUsage = 1
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/libmyodbc5.so
Setup = /usr/lib/libodbcmyS.so
Driver64 = /usr/lib64/libmyodbc5.so
Setup64 = /usr/lib64/libodbcmyS.so
FileUsage = 1
[FreeTDS]
Description = FreeTDS unixODBC Driver
Driver = /usr/lib64/libtdsodbc.so
cat /usr/local/freetds/etc/freetds.conf
[SASSQL26DEV]
host = 10.101.1.39
#port = 1433
tds version = 8.0
instance = CRMDEV
The following Nagios user is a domain user
isql -v SASSQL26DEV DOMAIN\nagios 'password'
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[ISQL]ERROR: Could not SQLConnect
The following testnagios user, is a MSSQL user
isql -v SASSQL26DEV testnagios 'ZAQ!2wsx'
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[ISQL]ERROR: Could not SQLConnect
cat 11sql2012_test.pl
#!/usr/bin/perl
use DBI;
my $user = "nagios";
my $passwd = "password";
my $server = "SASSQL26DEV";
my $dbh = DBI->connect("DBI:Sybase:server=$server", $user, $passwd, {PrintError => 0});
my $sth;
unless ($dbh) {
die "ERROR: Failed to connect to server ($server).\nERROR MESSAGE: $DBI::errstr";
} else {
print "\n";
print "Successful Connection.";
print "\n\n";
}
./11sql2012_test.pl
ERROR: Failed to connect to server (SASSQL26DEV).
ERROR MESSAGE: at ./11sql2012_test.pl line 13.
Thanks

Related

Error 20002 while trying to connect to a server through tsql (OS X)

I've been using this guide for connecting to database through pyodbc: https://github.com/mkleehammer/pyodbc/wiki/Connecting-to-SQL-Server-from-Mac-OSX
My config files look like this, in parallel with the tutorial:
In freetds.conf:
[MYMSSQL]
host = localhost
port = 1433
tds version = 7.3
In odbc.ini:
[MYMSSQL]
Description = Testing SQLServer
Driver = FreeTDS
Servername = MYMSSQL
In odbcinst.ini:
[FreeTDS]
Description=FreeTDS Driver for Linux & MSSQL
Driver=/usr/local/lib/libtdsodbc.so
Setup=/usr/local/lib/libtdsodbc.so
UsageCount=1
When I test the connection with "tsql -S MYMSSQL -U myuser -P mypassword", I get the error:
Error 20002 (severity 9):
Adaptive Server connection failed
There was a problem connecting to the server
Likewise, "isql MYMSSQL myuser mypassword" returns an error as well:
[ISQL]ERROR: Could not SQLConnect
EDIT: In the query console:
"SELECT ##SERVERNAME" returns "4a70ffff1294"
"SELECT ##SERVICENAME" returns "MSSQLSERVER"
"SELECT ##VERSION" returns "Microsoft SQL Server 2019 (RTM-CU8) (KB4577194) - 15.0.4073.23 (X64)"
tsql -S MYMSSQL
returns
locale is "en_US.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
Error 20002 (severity 9):
Adaptive Server connection failed
There was a problem connecting to the server
The server is running in a docker image. I am able to connect to it via pycharm's database tool with the 1433 port and the relevant password. Sadly, I'm not very experienced with managing servers. All help is much appreciated.
If you want to continue down that path, we need some more info. What's in your freetds.conf? Can you connect to your SQL Server from the machine you're trying to install FreeTDS on with telnet mssql.myhost.com 1433?
However, I find it easier to avoid using freetds.conf and odbc.ini, and just keep everything in Python. As long as you have properly configured odbcinst.ini, you should be able to do something like this:
import pyodbc
con = pyodbc.connect(
"DRIVER={FreeTDS};"
"SERVER=mssql.yourserver.com;"
"PORT=1433;"
"DATABASE=your_db;"
"UID=your_user;"
"PWD=your_pass;"
"TDS_Version=7.3;"
)
cursor = conn.cursor()
cursor.execute("SELECT 1")
for row in cursor.fetchall():
print(row)
Good luck!

Cannot to connect to SQL Server using FreeTDS and ODBC (raspberry pi raspbian)

Using a Raspberry Pi with Raspbian 9, I'm trying to connect to an Azure SQL database using ODBC (pip installed it from the shell) with FreeTDS (version 108)
Up until now, I have tried the following:
In /etc/odbcinst.ini:
[FreeTDS]
Description=FreeTDS Driver
Driver=/usr/lib/odbc/libtdsodbc.so
Setup=/usr/lib/odbc/libtdsS.so
In my /etc/odbc.ini
[name]
Driver=FreeTDS
ServerName = {MyServerString from Azure MS-SQL}
Database = {My database name from Azure MSQ-SQL}
TDS_Version = auto
In the FreeTDS.config file:
Created this block:
[name]
host = {MyServerString from Azure MSQ SQL}
port = 1433
tds version = auto
When I run the following command:
tsql -S {name} -U {my_username} -P {my_password}
I get the result
No errors ( 1> )
So I believe I am connected to the database.
However, when I run my Python code. I get an error. My database connection block is below
#Database setup
conDEBUG = "DRIVER={FreeTDS};Database={MyDGName};SERVER=tcp:{MyDB}.database.windows.net;UID={myUID};PWD={myPWD}"
conDEBUG = urllib.parse.quote_plus(conDEBUG)
conDEBUG = "mssql+pyodbc:///?odbc_connect=%s" % conDEBUG
app.config['SQLALCHEMY_DATABASE_URI'] = conDEBUG
db = SQLAlchemy(app)
I also tried adding 'TDS_Version=auto' to the conDEBUG string, this didn't work either.
The specific error I am getting:
('08001', '[08001] [unixODBC][FreeTDS][SQL Server]Unable to connect to data source (0) (SQLDriverConnect)')
Here's the function I use for connecting via SQLAlchemy to SQL Server over pyodbc:
def mssql_connect(con_string):
""" Connects to the specified db via ODBC. """
def connect():
return pyodbc.connect(con_string, autocommit=True)
db = create_engine('mssql://', creator=connect, encoding='cp1252')
db.echo = False
return db
mssql_connect("DRIVER={FreeTDS};SERVER={MyDB}.database.windows.net;PORT=1433;DATABASE={dbname};UID={myUID};PWD={myPWD};TDS_Version=7.3;")
Depending on your version of FreeTDS, you may have to replace TDS_Version=7.3 with TDS_Version=7.2 or TDS_Version=7.1. Good luck!

Connect to SQL Server database from RHEL with Windows Authentication

I have been working for two weeks in the installation of Superset (from Airbnb) for data visualization on a virtual RHEL machine and the connection with a SQL Server database. But I still cannot connect to this database because of a problem of driver I guess. I tried many things and I would like to know if you have a solution, about a driver I need, about modifications in my configuration etc...
Someone told me about jTDS driver. Maybe I need something like this but for python. If you have any idea, here is what I already did.
1) I tried to connect to the database from Superset :
SQL Alchemy URI : mssql://user:password#fr0-iacls-190.eu.company.corp:10001/dbname
ERROR : {"error": "Connection failed!\n\n
The error message returned was:\n(pyodbc.Error) ('IM002', '[IM002] [unixODBC][DriverManager]
Data source name not found, and no default driver specidied (0) (SQLDriverConnect)')"}
2) I tried almost the same with mssql+pymssql :
SQL Alchemy URI : mssql+pymssql://user:password#fr0-iacls-190.eu.company.corp:10001/dbname
ERROR:{"error":"Connection failed!\n\n
The error message returned was:\n(pymssql.OperationalError) (18456, 'DB-Lib error message 20018,
severity 14:\\nGeneral SQL Server error: Check messages from the SQL Server\\n
DB-Lib error message 20002, severity 9:\\n Adaptive Server connection failed (fr0-iacls-190.eu.company.corp:10001)\\n')"}
3) I tried to connect to the database from my terminal on virtual RHEL machine :
# tsql -S fr0-iacls-190.eu.company.corp -U user
Password:
locale is "en_US.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
20^C
Here I have a timer that increase the number every second. I stopped the example after 20 seconds.
4) Finally I tried a python script like this one :
import pyodbc
cnxn = pyodbc.connect('DRIVER={SQL Server};SERVER=fr0-iacls-190.eu.company.corp;DATABASE=dbname;UID=;PWD=password')
The empty UID is a tip used in another StackOverflow post.
# python connect.py
Traceback (most recent call last):
File "connect.py", line 2, in <module>
cnxn = pyodbc.connect('DRIVER={SQL Server};SERVER=fr0-iacls-190.eu.company.corp;DATABASE=dbname;UID=;PWD=password')
pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'SQL Server' : file not found (0) (SQLDriverConnect)")
To finish, I read about two files, odbc.ini and odbcinst.ini but I don't know if they are in the good directory (/etc). I am not working on root (~) but in in the parent directory of root (cd ~/..)...
Here are the two files if necessary :
odbc.ini
;
; odbc.ini
;
[ODBC Data Sources]
JDBC = Sybase JDBC Server
[JDBC]
Driver = /usr/local/lib/libtdsodbc.so
Description = Sybase JDBC Server
Trace = No
Servername = JDBC
Database = pubs2
UID = guest
[Default]
Driver = /usr/local/lib/libtdsodbc.so
odbcinst.ini
[PostgreSQL]
Description=ODBC for PostgreSQL
Driver=/usr/lib/psqlodbcw.so
Setup=/usr/lib/libodbcpsqlS.so
Driver64=/usr/lib64/psqlodbcw.so
Setup64=/usr/lib64/libodbcpsqlS.so
FileUsage=1
[MySQL]
Description=ODBC for MySQL
Driver=/usr/lib/libmyodbc5.so
Setup=/usr/lib/libodbcmyS.so
Driver64=/usr/lib64/libmyodbc5.so
Setup64=/usr/lib64/libodbcmyS.so
FileUsage=1
[MSSQLTest]
Driver = ODBC Driver 13 for SQL Server
Server = [http:]fr0-iacls-190.eu.company.corp[,10001]
#
# Note:
# Port is not a valid keyword in the ~/.odbc.ini file
# for the Microsoft ODBC driver on Linux
#
[ODBC Driver 13 for SQL Server]
Description=Microsoft ODBC Driver 13 for SQL Server
Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.4.0
UsageCount=1
Many thanks for your time and your help.
A few things to try:
Correct the python connection string:
You have the aliased the MS SQL driver in /etc/odbcinst.ini to [ODBC Driver 13 for SQL Server] therefore in your python code you should be using that, rather than SQL Server:
import pyodbc
cnxn = pyodbc.connect('Driver={ODBC Driver 13 for SQL Server};Server=fr0-iacls-190.eu.company.corp;Port=10001;Database=dbname;UID=user;PWD=password')
replacing user and password with correct credentials.
Use isql to test a connection using odbc.ini:
Generally you use the odbcinst.ini to setup driver configuration, and then odbc.ini for database instances (referencing the drivers), thus a valid entry to your odbc.ini could be:
[friendly_database_name]
Description=A description to help you remember what this connection is for
Server=fr0-iacls-190.eu.company.corp
Port=10001
Database=dbname
UID=user
PWD=password
If you have isql installed (comes as part of the unixODBC package if not), then you can test with:
$ isql -3 -v friendly_database_name
Ensure there's not a firewall blocking you:
I'm not sure why the tsql command is failing for you, it should return the 1> prompt. Ensure that you can establish a telnet connection to the database server:
$ telnet fr0-iacls-190.eu.company.corp 10001
which should give you something like:
Trying 12.34.56.78...
Connected to fr0-iacls-190.eu.company.corp.
Escape character is '^]'
and then to ctrl + ] and type quit to exit (or do ctrl + c to cancel if the telnet test fails).

tsql connects to ODBC but Perl DBI gets an error

Client is Ubuntu 14.04.1 LTS talking to an MS SQL Server 2005. Ubuntu has no registered domain. It's inside the local network as is the MS SQL Server.
Perl 5.18.2 using DBI 1.63 and DBD::ODBC 1.52.
Installed FreeTDS 0.92 (with TDS v4.2) and unixODBC 2.2.14.
isql DSN USERNAME PASSWD at the command line also doesn't work. Perhaps I should start with that. I still get the same error which is Unable to connect to data source (SQL-08001).
My related config files:
2015-07-09 11:55:14 AM
NOTE: TDS version from tsql -C must go into freetds.conf and odbc.ini files
=========================================
/etc/odbcinst.ini:
[FreeTDS]
Description = FreeTDS 0.91 for Microsoft SQL Server 2005
#Driver = /usr/lib/odbc/libtdsodbc.so
Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so
UsageCount = 1
#Threading = 2
fileusage = 1
dontdlclose = 1
=========================================
/etc/odbc.ini:
[ODBC Data Sources]
ResponseBDO = Response database desc in /etc/odbc/ini
[FreeTDS]
Description = FreeTDS 0.91 driver
Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
[responsebdo]
Driver = FreeTDS
Description = Response MSSQL 2005 ODBC driver
SERVER = sqlsvr.mydomain.com
PORT = 1433
USER = 'domain\domainuser'
Password = mypasswd
Database = r4w_004
# TDS_VERSION should be same as reported by 'tsql -C'.
TDS_Version = 4.2
[Default]
Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
Description = Default FreeTDS ODBC driver
SERVER = 10.20.30.40
USER = "domain\domainuser"
Database = r4w_4
=========================================
Relevant part of /etc/freetds/freetds.conf:
# $Id: freetds.conf,v 1.12 2007/12/25 06:02:36 jklowden Exp $
#
# This file is installed by FreeTDS if no file by the same
# name is found in the installation directory.
#
# For information about the layout of this file and its settings,
# see the freetds.conf manpage "man freetds.conf".
#
[responsetds]
#host = 10.20.30.40
host = sqlsvr.mydomain.com
port = 1433
tds version = 4.2
connect timeout = 20
timeout = 20
dump file = /tmp/freetds-resp.log
instance = MSSQLSERVER
use ntlmv2 = yes
=========================================
tsql -C:
Compile-time settings (established with the "configure" script)
Version: freetds v0.91
freetds.conf directory: /etc/freetds
MS db-lib source compatibility: no
Sybase binary compatibility: yes
Thread safety: yes
iconv library: yes
TDS version: 4.2
iODBC: no
unixodbc: yes
SSPI "trusted" logins: no
Kerberos: yes
=========================================
odbcinst --version:
unixODBC 2.2.14
Perl connection info:
$respdsn="dbi:ODBC:Driver={SQL Native Client};Server=10.20.30.40;".
"UID=$respdbuser;PWD=$respdbpw;Database=r4w_004";
$respdbh=DBI->connect($respdsn);
I can connect to the database by using tsql at the command line.
But using Perl I get this error:
DBI connect('Driver={SQL Native Client};Server=10.19.1.3;UID=gilson\mwreports;PWD=MR4gilson;Database=r4w_004','',...) failed:
[unixODBC][Driver Manager]Data source name not found, and no default
driver specified (SQL-IM002) at /home/chuck/perl/gilson/jimv/fedex/fedex.pl line 1557.
at /usr/lib/perl5/DBI.pm line 691.
DBI::__ANON__[/usr/lib/perl5/DBI.pm:744](undef, undef) called at /usr/lib/perl5/DBI.pm line 747
My questions:
Is the "{SQL Native Client}" in the Perl connection string correct? Does it refer to an entry in the odbc.ini or freetds.conf file?
What am I missing here?
Thank you.
If you're using FreeTDS, then your Driver is FreeTDS not "Sql Native Client".
Try this line to get your database handle:
my $dbh = DBI->connect("dbi:ODBC:Driver=FreeTDS;Server=10.20.30.40;database=r4w_004", $respdbuser, $respdbpw);
I had the same problem, when I using tsql works normally but using perl with dbi didn't. I lost many hours trying to figure out the problem, so I saw the limitations of Adaptive Server:
The name cannot be more than 30 characters long.
The first character must be a letter (ASCII a through z, A through Z).
The characters that follow must be letters, numbers, or underscores (_).
... So I tried to change the password that was 32 characters long to 30 characters and it works.
The tsql accept long password but perl dbi sybase accept ony 30 characters.
Command to connect to default instance on port 1433:
perl -e 'use DBI;DBI->connect("dbi:Sybase:server=10.0.0.1","sa","max_30_characters_longpassword");'
Command to connect to named instance (use port udp 1434 to discover the port):
perl -e 'use DBI;DBI->connect("dbi:Sybase:server=10.0.0.1\\SQL2014","sa","max_30_characters_longpassword");'
Command to connect to named instance when you know the port that sqlserver is listening:
perl -e 'use DBI;DBI->connect("dbi:Sybase:server=10.0.0.1:60036","sa","max_30characters_long_password");'
I used the tcpdump to monitoring the connection to the sqlserver:
tcpdump -qn dst host 10.0.0.1 &
Maybe it helps someone. Thanks

RODBC MS SQL access from Ubuntu using FreeTDS

I'm trying to access MS SQL server hosted on my Windows box from an Ubuntu machine. I have a shiny app that access MSSQL that works fine on Windows. I want to host this with shiny server on Ubuntu so that others can access the webpage and provide their SQL server as input to the app.
All of this works fine on Windows. Now I'm not able to get unixODBC working. I think I've got the odbc/freeTDS installation and configuration correct. I'm able to connect and query SQL DB instance from Ubuntu terminal using tsql -S . It took some googling but eventually it worked.
Now, when I try to connect from R I get this error.
sql <- odbcConnect("abc.xyz.com", "uname", "passwd")
In odbcDriverConnect("DSN=abc.xyz.com;UID=uname;PWD=passwd")
: [RODBC] ERROR: state 08001, code 0, message
[unixODBC][FreeTDS][SQL Server]Unable to connect to data source 2: In
odbcDriverConnect("DSN=abc.xyz.com;UID=uname;PWD=passwd")
: [RODBC] ERROR: state 01000, code 20002, message
[unixODBC][FreeTDS][SQL Server]Adaptive Server connection failed 3: In
odbcDriverConnect("DSN=abc.xyz.com;UID=uname;PWD=passwd")
: [RODBC] ERROR: state 01000, code 20017, message
[unixODBC][FreeTDS][SQL Server]Unexpected EOF from the server 4: In
odbcDriverConnect("DSN=abc.xyz.com;UID=uname;PWD=passwd")
: ODBC connection failed
freeTDS.conf
[abc.xyz.com]
host = abc.xyz.com
port = 49475
tds version = 8.0
odbcinst.ini
[FreeTDS]
Description = FreeTDS unixODBC Driver
Driver = /usr/local/lib/libtdsodbc.so
Setup = /usr/local/lib/libtdsodbc.so
odbc.ini
[abc.xyz.com]
Description = Shiny testing
Driver = FreeTDS
Trace = No
Server = abc.xyz.com\instance_name
Database = dbanme
port = 49475
This error "Unexpected EOF from the server" is not new to me. I got the same error when I was trying to connect using tsql. I was able to overcome this by adding "tds version = 8.0" line to freeTDS.conf. Not sure how I can get RODBC to use this config. I've read posts were other users were able to sql-server using freeTDS. Not sure what is missing here. I also tried re-installing RODBC.
I fixed this. TDS version was needed in odbc.ini file.
TDS_Version = 8.0
tsql reads version info from freeTDS.conf and worked. isql was failing with same error and it was also looking for this config in odbc.ini. So test with isql if you are configuring for R/Python.
I don't know what is causing the error on your side. Hope this helps:
These are my settings for RODBC 1.3-10 to connect to MSSQL Server 2012. I am also on ubuntu and this works for me.
I think I installed the RODBC package from the Ubuntu repos:
apt-cache policy r-cran-rodbc
r-cran-rodbc:
Installed: 1.3-10-1
Candidate: 1.3-10-1
Version table:
*** 1.3-10-1 0
500 ftp://ftp.fu-berlin.de/linux/ubuntu/ trusty/universe amd64 Packages
100 /var/lib/dpkg/statu
uname -a
Linux xxx 3.13.0-30-generic #54-Ubuntu SMP Mon Jun 9 22:45:01 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
odbc.ini
[mydsn]
APP = unixodbc
Description = master on vmXX
Driver = TDSdriver
Server = vmXX
Database = master
Port = 1433
#Trace = No
#TraceFile = /var/log/freetds/freetds--odbc.log
TDS Version = 7.2
freetds.conf
[global]
# TDS protocol version
; tds version = 4.2
# Whether to write a TDSDUMP file for diagnostic purposes
# (setting this to /tmp is insecure on a multi-user system)
#dump file = /tmp/freetds.log
#debug flags = 0xffff
# Command and connection timeouts
; timeout = 10
; connect timeout = 10
# If you get out-of-memory errors, it may mean that your client
# is trying to allocate a huge buffer for a TEXT field.
# Try setting 'text size' to a more reasonable limit
text size = 64512
[vmXX]
host = 111.222.333.555
port = 1433
tds version = 7.2
client charset = UTF-8
Output from
ps aux | grep "/R"
knb 56969 ....
lsof -p 56969 | grep -i odbc
R 56969 knb mem REG 8,1 72408 8528592 /usr/lib/x86_64-linux-gnu/libodbcinst.so.1.0.0
R 56969 knb mem REG 8,1 400608 8521896 /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
R 56969 knb mem REG 8,1 419680 8525415 /usr/lib/x86_64-linux-gnu/libodbc.so.1.0.0
R 56969 knb mem REG 8,1 96845 8933205 /usr/local/lib/R/site-library/RODBC/libs/RODBC.so
I had a similar error and realized R was just unable to read my user id correctly as it had a slash in it. I placed my credentials in a text file which solved the problem for me.
cred <- "/myPath/ODBC_cred.txt"
sql <- RODBC::odbcConnect("abc.xyz.com", uid=readLines(cred)[1], pwd=readLines(cred)[2])

Resources