oraParseConParams {ROracle}R Documentation

Parse an Oracle connection string

Description

Parse an oracle connections string of the form "user/password@dbname" to determine the three Oracle's connection parameters "username", "passwd" and "dbname".

Usage

oraParseConParams(username="", password="", dbname=ifelse(usingR(), Sys.getenv("ORACLE_SID"), getenv("ORACLE_SID")))

Arguments

username a character string of the form "username/passwd@dbname". Default is "".
password an optional password. If non-empty and there's also a password in the connection string username, this password overrides the one in username. Default is "".
dbname an optional database name (Oracle SID). If non-empty and there's also a database name in the connection string username, this database name overrides the one in username.

Details

Both username and password may be emtpy, in which case the username is set to "/"; this instructs Oracle to use the operating system user/password authentication (Oracle needs to be set up to do this.)

Value

A 3-element character vector with the username, passwd, and dbname suitable for a call to dbConnect.

References

http://stat.bell-labs.com/RS-DBI

See Also

dbConnect, Oracle

Examples

## Not run: 
   conParams <- parse.OraConParams("user/pwd@dbname")
## End(Not run)

[Package ROracle version 0.5-7 Index]