6.5 Connect OML4R Client to OML4R Server
Instructions for connecting to an OML4R server.
To connect an OML4R client to an OML4R server, start R using the ORE
script:
$ ORE R> library(ORE)
The following examples connect as user OMLUSER
with password OMLUSERpsw
:
-
For a remote database, specify the Oracle Database service identifier (SID), the host name, and the port for the connection.
ore.connect(user="OMLUSER", sid="orcl", host="severname", password="OMLUSERpsw", port=1521, all=TRUE)
Note:
To avoid specifying the password and other connection details in embedded R scripts, you can use Oracle Wallet. See Create an Oracle Wallet for an Oracle Machine Learning for R Connection.
-
For a local database, specify the connection as follows:
ore.connect("OMLUSER", password="OMLUSERpsw", conn_string="", all=TRUE)
See Also:
Oracle Machine Learning for R User’s Guide for details about connecting to an OML4R server
Parent topic: Install Oracle Machine Learning for R Client