Skip to contents

Provide a connection to the relevant Oracle database

Usage

db_connection(schema = "PRU_PROD")

Arguments

schema

the Oracle DB schema to connect to.

Value

A connection to a database (specifically an implementation of DBI::DBIConnection for an Oracle database.)

Note

The schema is in fact the prefix of the environment variables where the credentials are stored, like <schema>_USR, <schema>_PWD and <schema>_DBNAME. Possible values for schema are PRU_PROD, PRU_DEV, PRU_TEST, ...

Examples

if (FALSE) { # \dontrun{
conn <- db_connection()
# ... perform other API operations re-using the same connection
# ...
DBI::dbDisconnect(conn)
} # }