Returns a connection object for the current connection to Oracle Database, excluding the authentication credentials.
Use the connection object returned by orch.dbcon to reconnect to Oracle Database using orch.connect.
This example shows how you can reconnect to Oracle Database using the connection object returned by orch.dbcon:
R> orch.connect('localhost', 'RQUSER', 'orcl') Connecting ORCH to RDBMS via [sqoop] Host: localhost Port: 1521 SID: orcl User: RQUSER Enter password for [RQUSER]: password Connected [1] TRUE R> conn<-orch.dbcon() R> orch.disconnect() Disconnected from a database. R> orch.connect(conn) Connecting ORCH to RDBMS via [sqoop] Host: localhost Port: 1521 SID: orcl User: RQUSER Enter password for [RQUSER]: password Connected [1] TRUE
The following shows the connection object returned by orch.dbcon in the previous example:
R> conn
Object of class "orch.dbcon"
data frame with 0 columns and 0 rows
Slot "ok":
[1] TRUE
Slot "host":
[1] "localhost"
Slot "port":
[1] 1521
Slot "sid"
[1] "orcl"
Slot "user":
[1] "RQUSER"
Slot "passwd":
[1] ""
Slot "secure":
[1] TRUE
Slot "drv":
[1] "sqoop"