Skip Headers
Oracle® Data Mining Administrator's Guide
11g Release 1 (11.1)

Part Number B28130-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

2 Connecting to a Database for Data Mining

This chapter explains, in general terms, how to connect to an Oracle database to perform data mining and other database activities.

Note:

Oracle Database Online Documentation Library contains simple step-wise instructions to help you connect to and interact with an Oracle database. Here are two good places to start:

This chapter contains the following sections:

Your User ID

To connect to Oracle Database, you must log on with a user ID and password. To perform data mining activities in the database, you must log on with a user ID that has been granted the necessary database privileges.

If you simply wish to run the Data Mining sample programs, see "Create a Data Mining Demo User".

If you wish to perform broader data mining activities, refer to Chapter 4, "Users and Privileges for Data Mining".

Connect to a Local Database

In Chapter 1, you learned how to install Oracle Database on your personal computer. When you install Oracle Database locally, you do not need to install separate client software to connect to the database.

SQL*Plus and other client tools are installed with Oracle Database. The SQL*Plus executable is installed in the bin directory under Oracle Home. You can start SQL*Plus from the system command prompt or from the Windows Start menu.

You can use SQL*Plus to connect to your local database by simply specifying the global database name and providing a user name and password.

You can also use SQL*Plus to connect to a remote database by specifying a user name, password, and a Net Service Name. See "Create a Net Service Name".

Connect to a Remote Database

If you do not have a local database, you must install Oracle Client to obtain SQL*Plus and other tools for connecting to an Oracle database.

Install Oracle Client

Use the following steps to install Oracle Client on a Windows platform:

  1. From the Client installation directory, run SETUP.EXE.

    Oracle Universal Installer opens and displays the Welcome page. Click Next.

  2. On the Select Installation Type page, choose Administrator and click Next.

  3. On the Specify Home Details page, provide the path of a home directory for the Oracle Client installation.

  4. On the Product-Specific Prerequisite page, verify that all checks succeeded. If any checks failed, then you must correct the problem before proceeding.

  5. On the Summary page, click the Install button.

  6. The Installer displays the progress of the installation. When you click Next, the Configuration Assistants page is displayed.

  7. Oracle Net Configuration Assistant starts and displays the Welcome page. Choose Perform Typical Configuration.

    Oracle Net Configuration Assistant creates a simple connection using the Easy Connect naming method. This method enables clients to connect to a remote database server without any configuration. Clients specify a SQL CONNECT statement using a simple TCP/IP address, identified by a host name and an optional port number and service name.

    CONNECT username/password@host[:port][/servicename]
    
  8. When the Oracle Net Configuration process is complete, click Finish.

Perform Data Mining on a Remote Computer

You can connect to a remote instance of Oracle Database and perform data mining activities as long as:

  • SQL*Plus (or another client tool such as SQL Developer) has been installed on your computer.

  • The system administrator has created a user ID for you in the remote database.

  • The system administrator has granted the privileges to your user ID to allow the data mining activities that you will perform

  • The system administrator has provided you with the Oracle Net Service Name for connecting to the remote database

Run the Data Mining Sample Programs on a Remote Computer

If you wish to run the Data Mining sample programs on the remote computer:

  1. Go to the Sample Code page of Oracle Technology Network:

    http://www.oracle.com/technology/sample_code/index.html

  2. Scroll down to Sample Code — Data Warehousing & Business Intelligence and choose Oracle Data Mining.

  3. Unzip the sample programs to a directory on your computer

  4. Ask the system administrator to install the SH schema in the remote database, if it has not already been installed

  5. Ask the system administrator to run dmshgrants.sql to grant the appropriate privileges to your user ID.

  6. Start SQL*Plus and log in to the remote database as the Data Mining user. Run dmsh.sql to populate your schema with objects used by the sample programs. (See "Create a Data Mining Demo User" for information about dmshgrants.sql and dmsh.sql.)

  7. Follow the instructions in "Run the Sample Programs" .

Create a Net Service Name

A Net Service Name specifies the name of a database (the global database name), the name of the computer (host) on which it is installed, and the port number where the database listens for requests from a client.

There are several ways to create a Net Service Name. One method is the Easy Connect naming method that can be performed during the installation of Oracle Client (described in step 7 of "Connect to a Remote Database" ). You can also use Oracle Net Configuration Assistant to create a Net Service Name..

See Also:

"Configuring the Network Environment" in Oracle Database 2 Day DBA to learn about creating and specifying a Net Service Name.