A utility function enabling the user to connect to an internal database provided the user has permissions and posesses a valid username and password. A popup window is used for secure password enntry

connect_to_database(server, uid, quiet = F, ROracle = T)

Arguments

server

Character string. Name of the server

uid

Character string. Username of person with permissions

quiet

Boolean. Suppress successful connection message.

ROracle

Boolean. If using ROracle package driver to connect to db (Default = T)

Value

Object inherited from DBIConnection-class. This object is used to connect to communicate with the database engine. (see connect_to_database)

Details

For this to work, you need an oracle client installed. Tested with Oracle instantClient_12_2 installed Note: if you use 64 bit Rstudio then you need a 64 bit client Note: if you use 32 bit Rstudio then you need a 32 bit client

Warning

3 failed attempts and you will be locked out of the system.

See also

DBI, odbc

Examples

if (FALSE) {
con <- connect_to_database(server="name_of_server",uid="individuals_username")
}