A.2 Install the OML4SQL Examples
Learn how to install OML4SQL examples.
The OML4SQL examples require:
-
Oracle AI Database (on-premises, Oracle AI Database Cloud Service, or Oracle Autonomous AI Database)
-
Oracle AI Database sample schemas
-
A user account with the privileges described in Grant Privileges for Oracle Machine Learning for SQL.
-
Running of
dmshgrants.sqlby a system administrator -
Running of
dmsh.sqlby the OML4SQL user
Follow these steps to install the OML4SQL examples:
-
Install or obtain access to an Oracle AI Database 26ai instance. To install the database, see the installation instructions for your platform at Oracle AI Database 26ai.
-
Ensure that the sample schemas are installed in the database. See Oracle Database Sample Schemas for details about the sample schemas.
-
Download the example code files from GitHub at https://github.com/oracle/oracle-db-examples/tree/master/machine-learning/sql. Select the Database edition. Place the files in a directory to which you have access on the Oracle AI Database server. For example,
$ORACLE_HOME/demo/schema.$ORACLE_HOMEis the home path where you have installed the database. Typically,/scratch/u01/app/oracle/product/23.0.0/dbhome_1. -
Verify that your user account has the required privileges described in Grant Privileges for Oracle Machine Learning for SQL.
-
Ask your system administrator to run the
dmshgrants.sqlscript, or run it yourself if you have administrative privileges. The script grants the privileges that are required for running the examples. These includeSELECTaccess to tables in theSHschema as described in OML4SQL Sample Data and the system privileges.Connect as
SYSDBA:CONNECT sys / as sysdba Enter password: sys_password Connected.Pass the name of the OML4SQL user to
dmshgrants:@<location_of_examples>/dmshgrants oml_user -
Connect to the database and run the
dmsh.sqlscript. This script creates views of the sample data in the schema of the OML4SQL user.CONNECT oml_user Enter password: oml_user_password Connected.Issue the following to run the script:
@<location_of_examples>/dmsh.sql
Related Topics
Parent topic: Oracle Machine Learning for SQL Examples