Last active
October 19, 2017 17:51
-
-
Save daattali/8772dcd5cdc7c13b76ea99bee100113b to your computer and use it in GitHub Desktop.
connecting to SQL Server external vs local
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# production | |
dbConnect( | |
RSQLServer::SQLServer(), | |
server = config$server, | |
database = config$database, | |
properties = list( | |
user = config$uid, | |
password = config$pwd | |
) | |
) | |
# local | |
# 'server' changes to 'Server' | |
# 'database' changes to 'Database' | |
# properties isn't required | |
# Driver is required | |
# drv is different | |
dbConnect( | |
odbc::odbc(), | |
Driver = "{SQL Server}", | |
Server = config$server, | |
Database = config$database | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment