get_server_details: Get server details from YAML file

Description Usage Arguments Value See Also Examples

View source: R/Utils.R

Description

The sql.yaml file in a user's HOME directory can store server details and login credentials (in plain text). This works around the instability associated with jTDS's single-sign on functionality. The YAML file format is documented in this package's README file, while an example is provided in extdata/sql.yaml (see example). At a high level, each server should be documented in its own associative array with each aspect of the server documented in an associative array.

Usage

1

Arguments

server

corresponds to the server name key in the YAML file and should be a string.

file

defaults to NULL which means that it will use $HOME/sql.yaml.

Value

a named list of server details if this is specified in the file. It stops and returns an error if port and type keys are not specified for found server. NULL is returned if the file does not contain the server key

See Also

RSQLServer README YAML Example SQL Server instance

Examples

1
2
3
4
5
6
7
8
# See link below
## Not run: 
aw <- dbConnect(RSQLServer::SQLServer(), server = "mhknbn2kdz.database.windows.net",
 database = 'AdventureWorks2012',
 properties = list(user = "sqlfamily", password = "sqlf@m1ly"))
dbListTables(aw)

## End(Not run)

RSQLServer documentation built on June 20, 2017, 9:12 a.m.