绑定完请刷新页面
取消
刷新

分享好友

×
取消 复制
【卸载】在LINUX/UNIX环境下卸载Oracle的OLAP组件
2020-02-10 11:41:05
不知道朋友们有没有发现一个现象,即便在部署安装数据库实例的时候任何组件都不选择,数据库中的OLAP组件依然存在,不离不弃。
如何彻底地删除OLAP这个数据库组件呢?本文就此删除任务进行详细记录,供参考。

友情提示:没有特殊需求建议保留OLAP组件,没有必要特意删除这个组件。
特别提醒:在真正执行删除任务之前,请对数据库服务器进行全面备份,防止意外发生。

1.确认数据库中是否存在OLAP组件
1)种查看方法:使用SQL*Plus登录数据库时的提示信息
ora10g@secdb /home/oracle$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Mar 15 19:00:09 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

sys@ora10g>

上面提示的OLAP信息表示系统中安装有OLAP组件。

2)第二种查看方法:查看v$option视图
sys@ora10g> select * from v$option where PARAMETER='OLAP';

PARAMETER                VALUE
------------------------ ------------------------
OLAP                     TRUE

2.停掉数据库服务器上所有服务
此处所指的“所有服务”包括监听程序、运行在数据库服务器上的所有数据库实例等。
如果对所停掉的进程不够放心,可以考虑重启数据库服务器。此方法有暴力倾向,慎用,但有效。
1)停掉监听程序
ora10g@secdb /home/oracle$ lsnrctl stop

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 15-MAR-2011 19:03:37

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
The command completed successfully

2)停掉数据库实例
sys@ora10g> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

如果该服务器上同时存在多个数据库实例,需要一并停止。

3.删除OLAP组件命令行部分
1)进入到$ORACLE_HOME/rdbms/lib目录
ora10g@secdb /home/oracle$ cd $ORACLE_HOME/rdbms/lib

2)执行“make -f ins_rdbms.mk olap_off”命令
ora10g@secdb /oracle/ora10gR2/product/10.2.0/db_1/rdbms/lib$ make -f ins_rdbms.mk olap_off
/usr/bin/ar d /oracle/ora10gR2/product/10.2.0/db_1/rdbms/lib/libknlopt.a xsyeolap.o
/usr/bin/ar cr /oracle/ora10gR2/product/10.2.0/db_1/rdbms/lib/libknlopt.a /oracle/ora10gR2/product/10.2.0/db_1/rdbms/lib/xsnoolap.o


3)执行“make -f ins_rdbms.mk ioracle”命令
ora10g@secdb /oracle/ora10gR2/product/10.2.0/db_1/rdbms/lib$ make -f ins_rdbms.mk ioracle
chmod 755 /oracle/ora10gR2/product/10.2.0/db_1/bin

 - Linking Oracle
rm -f /oracle/ora10gR2/product/10.2.0/db_1/rdbms/lib/oracle
gcc  -o /oracle/ora10gR2/product/10.2.0/db_1/rdbms/lib/oracle -L/oracle/ora10gR2/product/10.2.0/db_1/rdbms/lib/ -L/oracle/ora10gR2/product/10.2.0/db_1/lib/ -L/oracle/ora10gR2/product/10.2.0/db_1/lib/stubs/ -L/usr/lib -lirc   -Wl,-E `test -f /oracle/ora10gR2/product/10.2.0/db_1/rdbms/lib/sskgpsmti.o && echo /oracle/ora10gR2/product/10.2.0/db_1/rdbms/lib/sskgpsmti.o` /oracle/ora10gR2/product/10.2.0/db_1/rdbms/lib/opimai.o /oracle/ora10gR2/product/10.2.0/db_1/rdbms/lib/ssoraed.o /oracle/ora10gR2/product/10.2.0/db_1/rdbms/lib/ttcsoi.o /oracle/ora10gR2/product/10.2.0/db_1/rdbms/lib/defopt.o  -Wl,--whole-archive -lperfsrv10 -Wl,--no-whole-archive /oracle/ora10gR2/product/10.2.0/db_1/lib/nautab.o /oracle/ora10gR2/product/10.2.0/db_1/lib/naeet.o /oracle/ora10gR2/product/10.2.0/db_1/lib/naect.o /oracle/ora10gR2/product/10.2.0/db_1/lib/naedhs.o /oracle/ora10gR2/product/10.2.0/db_1/rdbms/lib/config.o  -lserver10 -lodm10 -lnnet10 -lskgxp10 -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lhasgen10 -lcore10 -lskgxn2 -locr10 -locrb10 -locrutl10 -lhasgen10 -lcore10 -lskgxn2   -lclient10  -lvsn10 -lcommon10 -lgeneric10 -lknlopt `if /usr/bin/ar tv /oracle/ora10gR2/product/10.2.0/db_1/rdbms/lib/libknlopt.a | grep xsyeolap.o > /dev/null 2>&1 ; then echo "-loraolap10" ; fi` -lslax10 -lpls10  -lplp10 -lserver10 -lclient10  -lvsn10 -lcommon10 -lgeneric10 -lknlopt -lslax10 -lpls10  -lplp10 -ljox10 -lserver10 -lclsra10 -ldbcfg10 -locijdbcst10 -lwwg  `cat /oracle/ora10gR2/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /oracle/ora10gR2/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lmm -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /oracle/ora10gR2/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10 `cat /oracle/ora10gR2/product/10.2.0/db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10   -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `if /usr/bin/ar tv /oracle/ora10gR2/product/10.2.0/db_1/rdbms/lib/libknlopt.a | grep "kxmnsd.o" > /dev/null 2>&1 ; then echo " " ; else echo "-lordsdo10"; fi` -lctxc10 -lctx10 -lzx10 -lgx10 -lctx10 -lzx10 -lgx10 -lordimt10 -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lsnls10 -lunls10  -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -laio    `cat /oracle/ora10gR2/product/10.2.0/db_1/lib/sysliblist` -Wl,-rpath,/oracle/ora10gR2/product/10.2.0/db_1/lib -lm    `cat /oracle/ora10gR2/product/10.2.0/db_1/lib/sysliblist` -ldl -lm   -L/oracle/ora10gR2/product/10.2.0/db_1/lib
/oracle/ora10gR2/product/10.2.0/db_1/lib//libcore10.a(lcd.o): In function `lcdprm':
lcd.c:(.text+0x8e8): warning: the `gets' function is dangerous and should not be used.
mv -f /oracle/ora10gR2/product/10.2.0/db_1/bin/oracle /oracle/ora10gR2/product/10.2.0/db_1/bin/oracleO
mv /oracle/ora10gR2/product/10.2.0/db_1/rdbms/lib/oracle /oracle/ora10gR2/product/10.2.0/db_1/bin/oracle
chmod 6751 /oracle/ora10gR2/product/10.2.0/db_1/bin/oracle
ora10g@secdb /oracle/ora10gR2/product/10.2.0/db_1/rdbms/lib$


4.删除OLAP组件图形化界面部分
此处需要使用Oracle Universal Installer (OUI)图形界面来完成OLAP组件的删除。
由于本例数据库实例在部署的过程中未安装OLAP组件,因此此步骤可以省略,完成整个OLAP的删除任务。

5.确然OLAP组件是否卸载成功
1)种查看方法:使用SQL*Plus登录数据库时的提示信息
ora10g@secdb /home/oracle$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Mar 15 19:43:20 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning and Data Mining options

sys@ora10g>

大家可以与文章开始处的信息进行比较,此时提示信息中已经不存在OLAP组件信息。

2)第二种查看方法:查看v$option视图
sys@ora10g> select * from v$option where PARAMETER='OLAP';

PARAMETER            VALUE
-------------------- -------------
OLAP                 FALSE

此时OLAP组件信息也由原先的“TRUE”显示为“FALSE”,表示OLAP组件卸载成功。

6.小结
原则不变,OLAP本身没有必要一定卸载掉。这里只是给大家简单介绍一下卸载OLAP的方法。供大家参考。

Good luck.

secooler
11.03.15

-- The End --

分享好友

分享这个小栈给你的朋友们,一起进步吧。

OCM联盟
创建时间:2019-12-27 14:04:54
OCM联盟(OCMU – Oracle Certified Master Union)是一群有着共同理想,共同志向的DBA的家。 ⚠️该小栈仅限ocm成员入驻!审核制! Oracle Certified Master (OCM) -Oracle认证大师,是Oracle认证的别,是对数据库从业人员的技术、知识和操作技能的别的认可。Oracle OCM是解决困难的技术难题和复杂的系统故障的佳Oracle专家人选,也是IT行业衡量IT专家和经理人的高专业程度及经验的基准。
展开
订阅须知

• 所有用户可根据关注领域订阅专区或所有专区

• 付费订阅:虚拟交易,一经交易不退款;若特殊情况,可3日内客服咨询

• 专区发布评论属默认订阅所评论专区(除付费小栈外)

栈主、嘉宾

查看更多
  • 侯圣文@secooler
    栈主

小栈成员

查看更多
  • gaokeke123
  • ?
  • 山中老狐狸
  • 飘絮絮絮丶
戳我,来吐槽~