The Ask
The Advanced Analytics is eanbled on the oracle database 12c as shown below.
SQL> select * from v$option where PARAMETER like '%Advanced Analytics%'; PARAMETER VALUE CON_ID ---------------------------------------- -------------------- ---------- Advanced Analytics TRUE 0
User wants to disable this option from database.
The Solution
In Oracle 12c, Oracle Advanced Analytics is a combination of Oracle Data Mining and Oracle R Enterprise.
Verify Oracle Data Mining and Oracle R installed in your database
A. Verify Data Mining option is installed in your database
SQL> select * from v$option where PARAMETER like '%Data Mining%' PARAMETER VALUE CON_ID -------------------- -------------------- ---------- Data Mining TRUE 0
B. Verify Oracle R is installed in your database
To verify R installation, just run R in command line. This command will open R command prompt
$ R Oracle Distribution of R version [Oracle R Version] ...(output truncated) > q() Save workspace image? [y/n/c]: n
Another method to check if R is installed is to check its version using the below command.
$ R --version Oracle Distribution of R version 3.3.0 (--) -- "Supposedly Educational" Copyright (C) The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under the terms of the GNU General Public License versions 2 or 3. For more information about these matters see http://www.gnu.org/licenses/.
Disable Oracle Data Mining and Oracle R from database
A. Disable oracle Data Mining option
Steps for RAC Database :
$ cd $ORACLE_HOME/bin $ srvctl stop database -d [SID] $ chopt disable dm $ srvctl start database -d [SID]
Steps for non-RAC Database:
$ cd $ORACLE_HOME/bin $ sqlplus / as sysdba sql> shut immediate; sql> exit $ chopt disable dm $ sqlplus / as sysdba sql> startup;
B. Uninstall Oracle R
A full uninstall removes the rqsys metadata and PL/SQL code from the database and removes all Oracle R Enterprise Server libraries and R packages from Oracle home.
./server.sh --uninstall --full ./server.sh -u -full
Verification
Use the below query to verify that the Advanced Analytics is disabled from the Oracle Database 12c:
SQL> select * from v$option where PARAMETER like '%Advanced Analytics%'; PARAMETER VALUE CON_ID ---------------------------------------- -------------------- ---------- Advanced Analytics FALSE 0