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 OML_USER with password OML_USERpsw:

  • For a remote database, specify the Oracle Database service identifier (SID), the host name, and the port for the connection.

    ore.connect(user="OML_USER", sid="orcl", host="severname", password="OML_USERpsw",
                   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("OML_USER", password="OML_USERpsw", conn_string="", all=TRUE)
    

See Also:

Oracle Machine Learning for R User’s Guide for details about connecting to an OML4R server