R Studio is Missing ODBC Driver 13 for SQL Server to Connect R to MsSQL

Hello all,

I think R Studio Cloud is still missing ODBC Driver 13 for SQL Server.

When I write odbc::odbcListDrivers() to the script, I obtain :

odbcListDrivers()
name attribute
1 SQLite Description
2 SQLite Driver
3 SQLite Setup
4 SQLite UsageCount
5 SQLite3 Description
6 SQLite3 Driver
7 SQLite3 Setup
8 SQLite3 UsageCount
9 PostgreSQL ANSI Description
10 PostgreSQL ANSI Driver
11 PostgreSQL ANSI Setup
12 PostgreSQL ANSI Debug
13 PostgreSQL ANSI CommLog
14 PostgreSQL ANSI UsageCount
15 PostgreSQL Unicode Description
16 PostgreSQL Unicode Driver
17 PostgreSQL Unicode Setup
18 PostgreSQL Unicode Debug
19 PostgreSQL Unicode CommLog
20 PostgreSQL Unicode UsageCount
21 FreeTDS Description
22 FreeTDS Driver
23 FreeTDS Setup
24 FreeTDS CPTimeout
25 FreeTDS CPReuse
26 FreeTDS UsageCount
27 MySQL Driver
28 MySQL UsageCount
29 MySQL ODBC 5.3 Driver Driver
30 MySQL ODBC 5.3 Driver UsageCount
31 AmazonRedshift Driver
32 Hive Driver
33 Impala Driver
34 Oracle Driver
35 PostgreSQL Driver
36 Salesforce Driver
37 SQLServer Driver
38 Teradata Driver

And the error is

Error: nanodbc/nanodbc.cpp:950: 01000: [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 13 for SQL Server' : file not found

Thanks.

Hello all,

I think R Studio Cloud is still missing ODBC Driver 13 for SQL Server.

When I write odbc::odbcListDrivers() to the script, I obtain :

odbcListDrivers()
name attribute
1 SQLite Description
2 SQLite Driver
3 SQLite Setup
4 SQLite UsageCount
5 SQLite3 Description
6 SQLite3 Driver
7 SQLite3 Setup
8 SQLite3 UsageCount
9 PostgreSQL ANSI Description
10 PostgreSQL ANSI Driver
11 PostgreSQL ANSI Setup
12 PostgreSQL ANSI Debug
13 PostgreSQL ANSI CommLog
14 PostgreSQL ANSI UsageCount
15 PostgreSQL Unicode Description
16 PostgreSQL Unicode Driver
17 PostgreSQL Unicode Setup
18 PostgreSQL Unicode Debug
19 PostgreSQL Unicode CommLog
20 PostgreSQL Unicode UsageCount
21 FreeTDS Description
22 FreeTDS Driver
23 FreeTDS Setup
24 FreeTDS CPTimeout
25 FreeTDS CPReuse
26 FreeTDS UsageCount
27 MySQL Driver
28 MySQL UsageCount
29 MySQL ODBC 5.3 Driver Driver
30 MySQL ODBC 5.3 Driver UsageCount
31 AmazonRedshift Driver
32 Hive Driver
33 Impala Driver
34 Oracle Driver
35 PostgreSQL Driver
36 Salesforce Driver
37 SQLServer Driver
38 Teradata Driver

And the error is

Error: nanodbc/nanodbc.cpp:950: 01000: [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 13 for SQL Server' : file not found

Thanks.

Could you please include the line of code that generated this error, obscuring the server, user and password, of course.

Hi Josh,

con <- DBI::dbConnect(odbc::odbc(),
Driver = "ODBC Driver 13 for SQL Server",
Server = "",
Database = "
",
UID = "
",
PWD = ("
***"),
Port = 1433)

Here is the code.

Thanks.

1 Like

You need to choose one of the names that comes back from the list of available drivers.
FreeTDS and the RStudio Professional driver for SQLServer should both work.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.