Setting Up Oracle Data Miner 4.1


Options



Before You Begin

Purpose

This tutorial covers the process of setting up Oracle Data Miner 4.1 for use within Oracle SQL Developer 4.1.

Time to Complete

Approximately 15 mins

Background

The Oracle Data Miner 4.1 graphical user interface (GUI) is included as a free extension of Oracle SQL Developer, version 4.1. In order to use the Oracle Data Miner GUI to perform data mining, you must complete the following three setup tasks:

  1. Create a database user account for data mining
  2. Create a database connection within SQL Developer for the data miner user
  3. Install the Oracle Data Miner Repository

Note: You do not need any experience with SQL Developer in order to perform the required steps.

What Do You Need?

Have access to or have Installed the following:

  • Oracle Database: Minimum: Oracle Database 12c Enterprise Edition, Release 1.0.2 (12.1.0.2.0) with the Advanced Analytics Option.
  • The Oracle Database sample data, including the SH schema.
  • SQL Developer 4.1

Create a Data Miner User Account

SQL Developer is a client to the Oracle Database software. Before you can perform actions such as creating a user, you must connect to the database from SQL Developer.

To connect to the database, you will define an administrative (SYS) connection in SQL Developer, and then use that connection to create the data miner user.

  1. To open SQL Developer, double-click sqldeveloper.exe in the directory where you unzipped SQL Developer. Alternatively, you can create a desktop shortcut for the file.

  2. Note: If you are prompted to import settings from an earlier version, click Yes if you have been using an earlier version of SQL Developer and want to preserve those settings.

  3. In the SQL Developer Connections tab, right-click Connections and select New Connection from the pop-up menu:

  4. In the New / Select Database Connection dialog box, enter the following parameters:

    • Connection Name: admin
    • Username: sys
    • Password: The Administrative password for your database
    • Connection Type: Basic
    • Role: SYSDBA
    • Hostname: The host name of your database server (localhost if the database is installed on your PC)
    • Port: Enter the appropriate port number (1521 is the default)
    • SID: The SID for your database, such as orcl
  5. Note: This example covers a local database installation without the Container Database option (using SID)

  6. Click Test to test the connection. If the connection is successful, Status (just above the Help button) changes to "Success". Then, click Connect to save the connection and to also establish a connection to the database.

  7. Next, create a database account for the data mining user.

    A. In the SQL Developer Connections tab, expand the admin connection.

    B. Then, right-click the Other Users node and select Create User from the pop-up menu, like this:

    C. In the Create User window, select the User tab and specify a username, password, default tablespace, and temporary tablespace for the user account.

    Notes: The data miner user name can be any name you choose and there can be multiple user accounts in a single database. In addition, an account can also be shared by multiple users through the use of proxy user accounts.

    In the example below, the parameters include:

    • User Name: dmuser
    • Password: Create a password of your choice (we used dmuser as the password)
    • Default Tablespace: USERS
    • Temporary Tablespace: TEMP

    Note: Your available tablespaces may differ if you are using an existing database that does not have the standard default tablespaces.

    D. Still in the Create User window, select the Granted Roles tab and click the check box in the Granted Column for CONNECT.

    E. Still in the Create User window, select the Quotas tab and click the check box to set the default USERS Tablespace to Unlimited.

    F. Click Apply to create the account. Then, click OK in the resulting "Successful" window.

    G. Right-click DMUSER from the Other Users list, and select Edit User from the menu. Then select the SQL tab to view the SQL code and results.

    H. Finally, click Close to dismiss the Create User window.

Create a SQL Developer Connection for the Data Miner User

In this topic, you create a SQL Developer connection for the data miner user.

You can create this connection either by using the SQL Developer Connections tab or the Data Miner tab. In either case, the same New / Edit Database Connection dialog box appears. All saved SQL Developer connections appears in both tabs.

  1. In the SQL Developer Connections tab, right-click Connections and select New Connection from the pop-up menu:

  2. In the New / Select Database Connection dialog box, enter the following parameters:

    • Connection Name: dmuser
    • Username: dmuser
    • Password: dmuser
    • Connection Type: Basic
    • Role: default
    • Hostname: The host name of your database server (localhost if the database is installed on your PC)
    • Port: Enter the appropriate port number (1521 is the default)
    • SID: The SID for your database, such as orcl
  3. Note: This example covers a local database installation without the Container Database option (using SID)

  4. Click Test to test the connection. If the connection is successful, Status (just above the Help button) changes to "Success". Then, click Connect to save the connection and to also establish a connection to the database.

    Result: The SQL Developer Connections tab now displays both connections, like this

  5. Close the Start Page, dmuser, and admin Worksheet windows.

Install the Data Miner Repository

At this stage, you have created a database account for the data miner user (dmuser), and have created a SQL Developer connection for that user. Next, you install the Data Miner Repository in the database using an automated process.

To accomplish this, you simply display the Oracle Data Miner tab (which looks similar to the SQL Developer Connections tab), and then connect to the data miner user from the Data Miner tab.

Notes:

  • The Data Miner Repository installation routine automatically starts the first time that you activate a SQL Developer connection from the Data Miner tab.
  • Once the Data Miner Repository has been installed in the database, other data miner users may be granted the required privileges to the repository by an automated process that is similar to the installation routine examined here.

 

  1. From the SQL Developer menu, select Tools > Data Miner > Make Visible, as shown here:

    Description of this image

    Result: The Data Miner tab appears next to the SQL Developer Connections tab, like this.

  2. Dismiss the SQL Developer Connections tab by clicking its Close (X) icon. Now, only the Data Miner tab appears directly below the SQL Developer main menu.

  3. Next, add dmuser as a Data Miner connection by following these instructions:

    A. In the Data Miner tab, click the Add Connection tool (green "+" icon).

    Result: the Select Connection window opens.

    B. Select dmuser from the Connection list as shown here. And then click OK.

    Description of this image

    Result: dmuser appears in the Data Miner tab.

  4. To begin the installation process of the Data Miner Repository:

    A. Double-click on dmuser.

    Result: A message tells you that the Data Miner Repository is not installed in the database, and asks you if you want to install the Repository.

    B. Click Yes to launch the installation process.

  5. In the Connection Information dialog box:

    A. Enter the Administrative password for the database.

    Note: You must be logged in as SYS to install the repository.

    B. Click OK to continue.

  6. In the Repository Installation Settings dialog box:

    A. Select USERS as the Default Tablespace and TEMP as the Temporary Tablespace for the repository account named ODMRSYS.

    Notes:

    • The initial space requirement for the Data Miner Repository is 200MB; however, the tablespace grows as metadata is added.
    • The ODMRSYS repository account requires the use of a table space with SEGMENT_SPACE_MANAGEMENT set to automatic.

    B. Click OK to display the Install Data Miner Repository dialog box.

  7. In the Install Data Miner Repository dialog box:

    A. Click Start to begin the repository installation.

    Note: The Install Demo Data option is preselected (the demo data is required by subsequent Oracle Data Miner OBE tutorials).

    Notes:

    • The Installation takes approximately 10 minutes for remote database installations and 2 minutes for local database installations.
    • The scroll bar provides a visual indication of the installation process progress, as shown below.

    B. When the installation completes, you may optionally click Show Log to view the installation log.

    C. Click Close to dismiss the Install Data Miner Repository dialog box.

Want to Learn More?