Microsoft SQL Server
Microsoft Windows - The ODBC database drivers are usually pre-installed with the Windows operating systems.
Linux and Apple MacOS - This is the link to the Microsoft Docs site that outlines how to install the driver based on your specific Operating System: Installing the Microsoft ODBC Driver for SQL Server on Linux and macOS
There are several that either connect via ODBC but do not provide support for
DBI, or offer
DBI support but connect via JDBC. The
odbc package, in combination with a driver, satisfies both requirements.
There are five settings needed to make a connection:
- Driver - See the Drivers section for more information
- Server - A network path to the database server
- Database - The name of the database
- UID - The user’s network ID or server local account
- PWD - The account’s password
- Port - Should be set to 1433
con <- DBI::dbConnect(odbc::odbc(), Driver = "[your driver's name]", Server = "[your server's path]", Database = "[your database's name]", UID = rstudioapi::askForPassword("Database user"), PWD = rstudioapi::askForPassword("Database password"), Port = 1433)
This section will be updated as new issues are found, and when fixes are applied in the development version of the dbplyr package. The issue will be fully removed when the fix is part of of the package’s version in CRAN.
dbCompute()is not able to create a temporary table (Issue 2931)
is.na()does not work if used in a
filer()command (Issue 2940)
Direct support for Temporary Tables is missing. If using
copy_to(), the best workaround is to set the
FALSEand prefix the name with pound signs:
copy_to(my_table, "##my_table", TEMPORARY = FALSE).
Please refer to the Issues section in
dplyr to find out the latest regarding bugs and resolutions.