The scripts described in this document are available to manage the Oracle Data Miner Repository. These scripts are also integrated with Oracle SQL Developer to allow users to manage the repository through SQL Developer as well.
The scripts are only available via the SQL Developer installation
kit.
They are stored at the following location:
C:\<SQLDeveloper Home>\sqldeveloper\dataminer\scripts
The scripts can be run either via SQL*Plus or SQL Developer
Worksheet. In all cases the user must be logged in as SYS.
The instructions below assume that SQL*Plus or SQL Developer
Worksheet are defaulting to the dataminer\scripts directory when
locating script files. If you invoke SQL*Plus from the scripts
directory, that will set the default search directory to the
scripts directory. If you use SQL Worksheet, you need to go the
SQL Developer preferences and change the database/worksheet
setting for the default path to look for scripts.
installodmr.sql installs the Oracle Data Miner Repository; use it as follows:
set serveroutput on
@installodmr.sql <default_tablespace> <temp_tablespace>
Example: @installodmr.sql USER TEMP
The initial space requirement for the Data Miner Repository can
range from 200MB to 700MB depending on the tablespace setting;
however, the repository will grow as metadata is added. The table
space must have auto specified for segment space management on
database versions 11.2.0.4 or greater.
The script will take approximately 10 minutes to run for remote database installation and 2 minutes for local database installation.
See Loading and Dropping Sample Tables to load sample data.
usergrants.sql user account grants the specified user account the rights required by Oracle Data Miner to use the Oracle Data Miner Repository. For example,
@usergrants.sql MININGACCT
dropusergrants.sql user account revokes all of these grants. For example,
@dropusergrants.sql MININGACCT
See Loading and Dropping Sample Tables to load sample data.
dropRepositoryAndUserObjects.sql drops the Repository and the user objects.
@dropRepositoryAndUserObjects.sql
<session_disconnect>
For example:
@dropRepositoryAndUserObjects.sql DR
To avoid session locks that can block the drop repository
process, the drop repository script has an option to disconnect
sessions connected that have the ODMRUSER role privilege.
The session_disconnect parameter allows the user to disconnect
such sessions automatically or to just report on any instances of
such sessions. If any sessions are detected but not automatically
disconnected, the drop repository process is aborted.
The session_disconnect parameter has the following options:
R = report only, do not disconnect any
sessions
D = disconnect only, displays disconnect only
DR or RD = disconnect and report
See Loading and Dropping Sample Tables to
drop sample data.
Migrating a repository requires an understanding of what version
of Data Miner you are migrating from. Starting with SQL
Developer(Data Miner) 4.0, it is necessary to select a specific
migration script that suits the type of migration required. Below
are the categories of migration and the appropriate script for
each.
Migration Type |
Script Name |
Notes |
Data Miner (any version) installed on DB
11.2.0.1,11.2.0.2, 11.2.0.3 |
migrateodmr.sql |
|
Data Miner 3.2.2 or earlier installed on DB
11.2.0.4 and above, where the default ODMRSYS table space is
not ASM based |
upgradeRepoWithNewTableSpace.sql | ASM table space required as input parameter.
This will be used to migrate the workflow data from XML
Object Storage to XML Binary Storage |
Data Miner 3.2.2 installed on 11.2.0.4 and above, where the default ODMRSYS table space is ASM based | upgradeRepoFromORtoBinary.sql | workflow data will be migrated from XML
Object Storage to XML Binary Storage |
Data Miner 4.0 installed on 11.2.0.4 and
above. |
migrateodmr.sql | This is relevant for future releases where
there is no xml conversion from Object Storage to Binary
required. |
The scripts will migrate the Data Miner Repository from an earlier
version to the current version. All workflows created by users are
preserved; only the repository software is updated. Choose
the correct script from the matrix above and review the example on
how to invoke it below.
migrateodmr.sql example
To avoid session locks that can block the migrate repository process, the migrate repository script has an option to disconnect sessions connected that have the ODMRUSER role privilege. The session_disconnect parameter allows the user to disconnect such sessions automatically or to just report on any instances of such sessions. If any sessions are detected but not automatically disconnected, the drop repository process is aborted.@migrateodmr.sql
<session_disconnect>
For example:@migrateodmr.sql DR
The session_disconnect parameter has the following options:
R = report only, do not disconnect any
sessions
D = disconnect only, displays disconnect only
DR or RD = disconnect and report
@
upgradeRepoWithNewTableSpace.sql
<ASMTablespace> <session_disconnect>
For example:@
upgradeRepoFromORtoBinary.sql.sql example
upgradeRepoWithNewTableSpace
.sql MY_ASM_SPACE DR
@
upgradeRepoFromORtoBinary.sql
<session_disconnect>
For example:@
upgradeRepoFromORtoBinary.sql DR
These scripts load and remove the sample data used in the Cue Cards and in the Oracle by Example (OBE) for Oracle Data Miner:
Example: @instDemoData.sql MYUSER
Example: @dropDemoData.sql MYUSER