Remove Components and Options from Oracle Database 11.2.0 ...

80
Copyright © 2017 Oracle and/or its affiliates. All rights reserved. | Remove Components and Options from Oracle Database 11.2.0.4 – 12.2.0.1 Remove Components and Options from Oracle Databases Mike Dietrich Master Product Manager Database Upgrades & Migrations Oracle Corporation

Transcript of Remove Components and Options from Oracle Database 11.2.0 ...

Page 1: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

RemoveComponentsandOptionsfromOracleDatabase11.2.0.4– 12.2.0.1

RemoveComponentsandOptionsfromOracleDatabases

MikeDietrichMasterProductManagerDatabaseUpgrades&MigrationsOracleCorporation

Page 2: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017, Oracleand/oritsaffiliates.Allrightsreserved.|

$> whoami

2Remove ComponentsandOptions fromOracleDatabases

6yearsRDBMSCore&MissionCriticalSupport

5.5yearsTechnologyPresalesforDataGuard,Upgrades

>9yearsSTUpgradeDevelopmentTeam

50%ReferenceProjects

50%WorkshopsWorldwide

+x%Development

Work

MikeDietrichMasterProductManagerDatabaseUpgrades&Migrations

MikeDietrichDE

https://MikeDietrichDE.com

Page 3: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

RemoveComponentsandOptionsfromOracleDatabases

PrefaceandScope

OracleDatabase11.2.0.4

OracleDatabase12.1.0.2

OracleDatabase12.2.0.1

Addendum- ScriptsandFurtherInformation

3

1

2

3

4

5

Remove ComponentsandOptions fromOracleDatabases |

Page 4: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017, Oracleand/oritsaffiliates.Allrightsreserved.|

PrefaceandScope• Scopeofdatabasereleases:–OracleDatabase11.2.0.4–OracleDatabase12.1.0.2–OracleDatabase12.2.0.1• non-CDB• CDB

RemoveComponentsandOptionsfromOracleDatabases 4

Page 5: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017, Oracleand/oritsaffiliates.Allrightsreserved.|

Precaution• Thispresentationisnotarecommendationtoeitherdroporremoveanycomponents generallyfromadatabase• ThispresentationsisneitheranofficialOracledocumentationnordoesithavetobenecessarilycorrect.TestcarefullyandcheckwithOracleSupport.• Workaroundsarejustrecommendations– theremightbedifferentandbetterworkaroundsavailable– testcarefullyandcheckwithOracleSupport!!!• Beawarethatdatamaybelostincasecomponentsareinuse(e.g.APEX)• Alwayshavearestorableandrecoverablebackup• XDBisamandatorycomponentsinceOracleDatabase12c

RemoveComponentsandOptionsfromOracleDatabases 5

Page 6: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017, Oracleand/oritsaffiliates.Allrightsreserved.|

DatabaseUpgradeDuration• Databaseupgradedurationismainlydependentoninstalledcomponents– ParallelupgradesinceOracle12cdoesonlyupgradeafewcomponentsinparallel– ImpactoftoomanycomponentsinOracleMultitenantevenhigher

RemoveComponentsandOptionsfromOracleDatabases 6

Component HH:MM:SS

Oracle Server 00:16:17

JServer JAVA Virtual Machine 00:05:19

Oracle Workspace Manager 00:01:01

Oracle Enterprise Manager 00:10:13

Oracle XDK 00:00:48

Oracle Text 00:00:58

Oracle XML Database 00:04:09

Oracle Database Java Packages 00:00:33

Oracle Multimedia 00:07:43

Oracle Expression Filter 00:00:18

Oracle Rule Manager 00:00:12

Gathering Statistics 00:04:53

Total Upgrade Time: 00:52:31

Component HH:MM:SS

Oracle Server 00:16:17

JServer JAVA Virtual Machine 00:05:19

Oracle XDK 00:00:48

Oracle Text 00:00:58

Oracle XML Database 00:04:09

Oracle Database Java Packages 00:00:33

Gathering Statistics 00:02:43

Total Upgrade Time: 00:30:47

Page 7: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017, Oracleand/oritsaffiliates.Allrightsreserved.|

ImportantRecommendations• MakesuretheOracledemousers(SH,OE etc)getremoved– According to MOS Note: 457800.1 these can be dropped with:• SQL> drop user <username> cascade;

• Takeabackupbeforeapproachinganyoftheremovalstepsoruseaguaranteedrestorepointifdowntimeisallowed• Theorderofslidesisarecommendationonhowtoremovecomponentsinthecorrectandleast-invasivesequence• Componentdependenciesmustbetakenintoconsideration

RemoveComponentsandOptionsfromOracleDatabases 7

Page 8: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017, Oracleand/oritsaffiliates.Allrightsreserved.|

GuidetoRemovalScripts• Intheory:Thisisthecalltoreveal removalscripts:– SQL> SELECT dbms_registry_sys.removal_script('<comp_id>') from dual;• SQL> select COMP_ID from DBA_REGISTRY;

• Butit'snotimplementedformostcomponents– Correctresultsdisplayedfor:• OWM:?/rdbms/admin/owmremov.sql• ORDIM:?/ord/im/admin/imremov.sql

– Scriptnamesreturneddon'texist:• APS,XOQ,OLAP,CONTEXT,SDO,RAC

– Scriptnothing.sql doesnotdoanything:• JAVA,XML,XDB

RemoveComponentsandOptionsfromOracleDatabases 8

Page 9: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

RemoveComponentsandOptionsfromOracleDatabases

PrefaceandScope

OracleDatabase11.2.0.4

OracleDatabase12.1.0.2

OracleDatabase12.2.0.1

Addendum- ScriptsandFurtherInformation

9

1

2

3

4

5

Remove ComponentsandOptions fromOracleDatabases |

Page 10: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

chopt

RemoveComponentsandOptionsfromOracleDatabases 10

Page 11: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

ComponentOverview

RemoveComponentsandOptionsfromOracleDatabases 11

Page 12: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

APEX - OracleApplicationExpress3.2.1

§ Removalscript(s):– @?/apex/apxremov.sql

§ MyOracle Support:– MOSNote:558340.1:HowtoUninstallAPEXfroma10G/11GDatabase

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 12

Restart Recompilation Relink ErrorsNo No No 1packagebodyleftover:

SQL> drop package HTMLDB_SYSTEM;

Page 13: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

OWM- OracleWorkspaceManager

§ Removalscript(s):– @?/rdbms/admin/owmuinst.plb

§ MyOracle Support:– 263428.1- HowtoDe-installOracleWorkspaceManager

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 13

Restart Recompilation Relink ErrorsNo No No None

Page 14: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

OLS – OracleLabelSecurity

§ Removalscript(s)– removeDVfirstifinstalled:– @?/rdbms/admin/catnools.sql

§ Optional:UnlinkLabelSecurity– $> chopt disable lbac

§ Documentation:– http://docs.oracle.com/cd/E11882_01/network.112/e10745/appxc.htm#OLSAG3665

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 14

Restart Recompilation Relink ErrorsNo Yes Optional Leftovers:21objectsinvalid

Recompilationfixesit.

Page 15: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

SDO - SpatialDataOption

§ Documentation:– MOSNote:179472.1- StepsforManualDe-installationofOracleSpatial– ThereisnoremovalscriptprovidedbytheSpatialteam

§ Removalstepsifnospatialfunctionalityhasbeenused§ SQL> drop user MDSYS cascade;§ Dropallsynonymswheretable_owner='MDSYS'§ SQL> drop user mddata cascade;

§ SQL> drop user spatial_csw_admin_usr cascade;

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 15

Restart Recompilation Relink ErrorsNo/Yes No No IssueswithORA-14452requirearestart

set pagesize 0 set feed off spool dropsyn.sqlselect 'drop public synonym "' || synonym_name || '";' from dba_synonyms where table_owner='MDSYS'; spool off;@dropsyn.sql

Page 16: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

CONTEXT - OracleText

§ Removalscript(s):– SQL> @?/ctx/admin/catnoctx.sql

– SQL> drop procedure sys.validate_context;

§ Note:970473.1- Manualinstallation,deinstallationofOracleText11.2

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 16

Restart Recompilation Relink ErrorsNo Yes No Becauseofdependencies XDB.DBMS.XDBTwillbeinvalid

SeeMOSNote:296869.1• SQL> drop package XDB.dbms_xdbt;• SQL> drop procedure xdb.xdb_datastore_proc;• SQL> start ?/rdbms/admin/utlrp.sql

Page 17: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

ORDIM - OracleMultimedia

§ Removalscript(s):– SQL> @?/rdbms/admin/catcmprm.sql ORDIM

§ Note:337415..1– Wheretofindinfoaboutupgrade,downgrade&deinstall

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 17

Restart Recompilation Relink ErrorsNo No No • Script requiresinteractiveY/N

• ScriptwilldropMDSYS(Spatial)useraswell

Page 18: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

XOQ- OLAPAPI

§ Removalscript(s)– SQL> @?/olap/admin/olapidrp.plb

– SQL> @?/olap/admin/catnoxoq.sql

– SQL> start ?/rdbms/admin/utlrp.sql

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 18

Restart Recompilation Relink ErrorsNo Yes No • Scriptshavethesameerrorssincereleases

• 20synonymsleftinvalid• Recompilationnecessarytofixit• Many"error"dropsofobjectswhichdon'texist

Page 19: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

APS- OLAPAnalyticalWorkspace

§ Unlinkfirst– $> chopt disable olap

§ Removalscript(s)– SQL> @?/olap/admin/catnoaps.sql

– SQL> start ?/rdbms/admin/utlrp.sql

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 19

Restart Recompilation Relink ErrorsYes Yes Yes • 3public synonymsleft

• Recompilationrequired

Page 20: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

AMD- OLAPCatalog

§ Documentation/MOS:– Note:332351.1- HowtoremoveorreinstalltheOLAPoptionto10g/11g

§ Removalscript(s)– SQL> @?/olap/admin/catnoamd.sql

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 20

Restart Recompilation Relink ErrorsNo No No None

Page 21: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

OWB– OracleWarehouseBuilder

§ Documentation/MOS:– Note:1074425.1- HowtoremoveOWBObjectsin11.1andhigher

§ Removalscript(s)– SQL> @?/owb/UnifiedRepos/clean_owbsys.sql

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 21

Restart Recompilation Relink ErrorsNo No No None

Page 22: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

EXF/RUL– ExpressionFiltersandRulesManager

§ Documentation/MOS:– 258618.1HowToInstall/UninstallExpressionFilterFeatureorEXFSYS

§ Removalscript(s)– SQL> @?/rdbms/admin/catnoexf.sql

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 22

Restart Recompilation Relink ErrorsNo No No None

Page 23: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

EM– EnterpriseManagerDatabaseControl

§ Documentation/MOS:– Note:278100.1- HowtoDrop,CreateandRecreateDBControlin10g

§ Removalscript(s)– $> emctl stop dbconsole

– SQL> start /u01/app/oracle/product/12.1.0.2/rdbms/admin/emremove.sql

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 23

Restart Recompilation Relink ErrorsNo No No Theemremove.sql scriptsgetsshipped sinceOracle12candcan

berunagainstany11.2databasetoremoveEMDatabaseControlrepositorycleanly

Page 24: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

JAVAVM/XML- JavaVirtualMachineandXDK

§ Removalscript(s)– SQL> @?/rdbms/admin/catnojav.sql

– SQL> @?/xdk/admin/rmxml.sql

– SQL> @?/javavm/install/rmjvm.sql

– SQL> @?/rdbms/admin/utlrp.sql

– SQL> delete from registry$ where status='99' and cid in ('XML','JAVAVM','CATJAVA');

– SQL> commit;

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 24

Restart Recompilation Relink ErrorsNo Yes No None

Page 25: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

XDB– OracleXMLDatabase

§ IrefusetotakeoutXDBas:– It'smandatorysinceOracle12canyways– Theremovalprocessisfarawayfrombeingsmoothandflawless

§ Documentation/MOS:– Note:1292089.1– MasterNoteforXMLDB(XDB)Install/Deinstall

§ Removalprocesswithmanyleftovers:– SQL> shutdown immediate

– SQL> startup upgrade

– SQL> @?/rdbms/admin/catnoqm.sql

§ Cleanup:– MOSNote: 1269470.1XDBDeinstallation scriptcatnoqm.sql leadstoInvalidSYSobjs

RemoveComponentsandOptionsfromOracleDatabases 25

Page 26: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

RemoveComponentsandOptionsfromOracleDatabases

PrefaceandScope

OracleDatabase11.2.0.4

OracleDatabase12.1.0.2

OracleDatabase12.2.0.1

Addendum- ScriptsandFurtherInformation

26

1

2

3

4

5

Remove ComponentsandOptions fromOracleDatabases |

Page 27: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

chopt

RemoveComponentsandOptionsfromOracleDatabases 27

Page 28: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

ComponentOverview

RemoveComponentsandOptionsfromOracleDatabases 28

Page 29: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

APEX - OracleApplicationExpress4.2.5

§ Removalscript(s):– @?/apex/apxremov.sql

§ MyOracle Support:– MOSNote:558340.1:HowtoUninstallAPEXfroma10G/11GDatabase

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 29

Restart Recompilation Relink ErrorsNo No No 2 synonymsleftover:

SQL> drop PUBLIC SYNONYM APEX_SPATIAL;SQL> drop PUBLIC SYNONYM APEX_PKG_APP_INSTALL_LOGIN;

Page 30: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

OWM- OracleWorkspaceManager

§ Removalscript(s):– @?/rdbms/admin/owmuinst.plb

§ MyOracle Support:– 263428.1- HowtoDe-installOracleWorkspaceManager

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 30

Restart Recompilation Relink ErrorsNo No No None

Page 31: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

DV – DatabaseVault

§ Unlinkifit'slinkedintothekernel:– cd $ORACLE_HOME/rdbms/lib

– make -f ins_rdbms.mk dv_off ioracle

§ Removalscript(s):– SQL> alter system set recyclebin=off scope=spfile

– SQL> startup force

– SQL> @?/rdbms/admin/dvremov.sql

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 31

Restart Recompilation Relink ErrorsYes No Yes Leftovers:

SQL> drop public synonym DBA_DV_STATUS;SQL> drop view SYS.DBA_DV_STATUS;

Page 32: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

OLS – OracleLabelSecurity

§ Removalscript(s)– removeDVfirst:– @?/rdbms/admin/catnools.sql

§ Documentation:– http://docs.oracle.com/database/122/OLSAG/oracle-label-security-using-oracle-internet-directory.htm#OLSAG030

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 32

Restart Recompilation Relink ErrorsNo No No No

Page 33: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

SDO - SpatialDataOption

§ Removalscript(s):– ThereisnofancyremovalscriptprovidedbytheSpatialteam

§ Removalstepsifnospatialfunctionalityhasbeenused§ SQL> drop user MDSYS cascade;§ Dropallsynonymswheretable_owner='MDSYS'§ SQL> drop user mddata cascade;§ SQL> drop user spatial_csw_admin_usr cascade;

§ MOSNote:179472.1- StepsforManualDe-installationofOracleSpatial§ Details:

RemoveComponentsandOptionsfromOracleDatabases 33

Restart Recompilation Relink ErrorsNo No No Synonyms needtobecleanedup

set pagesize 0 set feed off spool dropsyn.sqlselect 'drop public synonym "' || synonym_name || '";' from dba_synonyms where table_owner='MDSYS'; spool off;@dropsyn.sql

Page 34: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

CONTEXT - OracleText

§ Removalscript(s):– SQL> @?/ctx/admin/catnoctx.sql

– SQL> drop procedure sys.validate_context;

§ Note:970473.1- Manualinstallation,deinstallationofOracleText11.2

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 34

Restart Recompilation Relink ErrorsNo Yes No Becauseofdependencies XDB.DBMS.XDBTwillbeinvalid

SeeMOSNote:296869.1• SQL> drop package XDB.dbms_xdbt;• SQL> drop procedure xdb.xdb_datastore_proc;• SQL> start ?/rdbms/admin/utlrp.sql

Page 35: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

ORDIM - OracleMultimedia

§ Removalscript(s):– SQL> @?/rdbms/admin/catcmprm.sql ORDIM

§ Note:337415..1– Wheretofindinfoaboutupgrade,downgrade&deinstall

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 35

Restart Recompilation Relink ErrorsNo No No None

Page 36: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

XOQ- OLAPAPI

§ Removalscript(s)– SQL> @?/olap/admin/olapidrp.plb

– SQL> @?/olap/admin/catnoxoq.sql

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 36

Restart Recompilation Relink ErrorsNo Yes No • Scriptshavethesameerrorssincereleases

• 38objectsleftinvalid• Recompilationnecessarytofixit• Many"error"dropsofobjectswhichdon'texist

Page 37: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

APS- OLAPAnalyticalWorkspace

§ Unlinkfirst– $> chopt disable olap

§ Removalscript(s)– SQL> @?/olap/admin/catnoaps.sql

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 37

Restart Recompilation Relink ErrorsYes Yes Yes • 3public synonymsleft

• Recompilationrequired

Page 38: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

JAVAVM/XML- JavaVirtualMachineandXDK

§ Removalscript(s)– SQL> @?/rdbms/admin/catnojav.sql

– SQL> @?/xdk/admin/rmxml.sql

– SQL> @?/javavm/install/rmjvm.sql

– SQL> @?/rdbms/admin/utlrp.sql

– SQL> delete from registry$ where status='99' and cid in ('XML','JAVAVM','CATJAVA');

– SQL> commit;

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 38

Restart Recompilation Relink ErrorsNo Yes No Twoleftover packages

• package SYS.JVMRJBCINV• package SYS.JAVAVM_SYS

Page 39: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

RemoveComponentsandOptionsfromOracleDatabases

PrefaceandScope

OracleDatabase11.2.0.4

OracleDatabase12.1.0.2

OracleDatabase12.2.0.1

� non-CDB

Addendum- ScriptsandFurtherInformation

39

1

2

3

4

5

Remove ComponentsandOptions fromOracleDatabases |

Page 40: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

chopt

RemoveComponentsandOptionsfromOracleDatabases 40

Page 41: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

ComponentOverview

RemoveComponentsandOptionsfromOracleDatabases 41

Page 42: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

APEX - OracleApplicationExpress5.0.4� non-CDB

§ Removalscript(s):– @?/apex/apxremov.sql

§ MyOracle Support:– MOSNote:558340.1:HowtoUninstallAPEXfroma10G/11GDatabase

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 42

Restart Recompilation Relink ErrorsNo No No None

Page 43: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

OWM- OracleWorkspaceManager� non-CDB

§ Removalscript(s):– @?/rdbms/admin/owmuinst.plb

§ MyOracle Support:– 263428.1- HowtoDe-installOracleWorkspaceManager

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 43

Restart Recompilation Relink ErrorsNo No No None

Page 44: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

OLS – OracleLabelSecurity� non-CDB

§ Removalscript(s):– @$ORACLE_HOME12102/rdbms/admin/catnools.sql

§ Documentation:– http://docs.oracle.com/database/122/OLSAG/oracle-label-security-using-oracle-internet-directory.htm#OLSAG030

– Details:

RemoveComponentsandOptionsfromOracleDatabases 44

Restart Recompilation Relink ErrorsNo No No Script catnools.sql ismissinginOracleDatabase12.2.0.1

Workaround:UsetheOracle12.1.0.2catnools.sql anddroptheremainingtwopackagebodiesmanuallySQL> drop package LBAC_EXP;SQL> drop package OLS_ENFORCEMENT;

Page 45: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

SDO - SpatialDataOption� non-CDB

§ Removalscript(s):– mddins.sql isn't very helpful

§ Removalstepsifnospatialfunctionalityhasbeenused§ drop user MDSYS cascade;§ Dropallsynonymswheretable_owner='MDSYS'§ drop user mddata cascade;§ drop user spatial_csw_admin_usr cascade;

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 45

Restart Recompilation Relink ErrorsNo No No SDO_RDF_EXP_IMP– newin12.2.0.1 – remainsINVALIDasleftover

– seemstobelongtoGRAPH- ?/md/admin/semremov.sql IfdroppedwithoutdroppingAPEX5invalidobjectswillremain

Page 46: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

CONTEXT - OracleText� non-CDB

§ Removalscript(s):– SQL> @?/ctx/admin/catnoctx.sql

– SQL> drop procedure sys.validate_context

§ Note:970473.1- Manualinstallation,deinstallationofOracleText11.2

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 46

Restart Recompilation Relink ErrorsNo Yes No Becauseofdependencies XDB.DBMS.XDBTwillbeinvalid

SeeMOSNote:296869.1• SQL> drop package XDB.dbms_xdbt;• SQL> drop procedure xdb.xdb_datastore_proc;• SQL> start ?/rdbms/admin/utlrp.sql

Page 47: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

ORDIM - OracleMultimedia� non-CDB

§ Removalscript(s):– SQL> @?/rdbms/admin/catcmprm.sql ORDIM

§ Note:337415..1– Wheretofindinfoaboutupgrade,downgrade&deinstall

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 47

Restart Recompilation Relink ErrorsNo Yes No Script expectsaninteractiveY/Nanswer

Leftovers:SYS JAVA DATA prv//////OBPJCDOAAAAAAAAA INVALIDSYS JAVA DATA prv//////NGOANDOGAAAAAAAA INVALIDSYS PACKAGE BODY ORD_ADMIN INVALIDSYS PACKAGE BODY ORDIMDPCALLOUTS INVALID

ManualcompilationcompilestheJavaobjectsbutpackagesneedtobedroppedmanually

Page 48: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

XOQ- OLAPAPI� non-CDB

§ Removalscript(s)– SQL> @?/olap/admin/olapidrp.plb

– SQL> @?/olap/admin/catnoxoq.sql

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 48

Restart Recompilation Relink ErrorsNo Yes No • Scriptshavethesameerrorssincereleases

• 20objectsleftinvalid• Recompilationnecessarytofixit• Many"error"dropsofobjectswhichdon'texist

Page 49: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

APS- OLAPAnalyticalWorkspace� non-CDB

§ Unlinkfirst– $> chopt disable olap

§ Removalscript(s)– SQL> @?/olap/admin/catnoaps.sql

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 49

Restart Recompilation Relink ErrorsYes Yes Yes • 4public synonymsleft

• Recompilationrequired

Page 50: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

JAVAVM/XML- JavaVirtualMachineandXDK� non-CDB

§ Removalscript(s)– SQL> @?/rdbms/admin/catnojav.sql

– SQL> @?/xdk/admin/rmxml.sql

– SQL> @?/javavm/install/rmjvm.sql

– SQL> @?/rdbms/admin/utlrp.sql

– SQL> delete from registry$ where status='99' and cid in ('XML','JAVAVM','CATJAVA');

– SQL> commit;

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 50

Restart Recompilation Relink ErrorsNo Yes No Twoleftover packagebodies

• SQL> drop package JAVAVM_SYS;• SQL> drop package JVMRJBCINV;

Page 51: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

RemoveComponentsandOptionsfromOracleDatabases

PrefaceandScope

OracleDatabase11.2.0.4

OracleDatabase12.1.0.2

OracleDatabase12.2.0.1

� CDB

Addendum- ScriptsandFurtherInformation

51

1

2

3

4

5

Remove ComponentsandOptions fromOracleDatabases |

Page 52: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

SomeRecommendations

§ Allpluggabledatabasemustbeopened– SQL> alter pluggable database all open;

§ catcon.plmustbeusedtoexecuteremovalscriptsinmanycases– Otherwiseoptionswon'tberemovedfromthePDB$SEED– APEXhandlestheremovalwithaseparatescript

§ Thefollowingstepsarenotdocumentedyetinmanycases– pleaseseethisonlyasaproposalanddouble-checkwithOracleSupport

§ Recompilationneedstobedonethisway:$ cd $ORACLE_HOME/rdbms/admin

$ $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -e -b utlrp -d '''.''' utlrp.sql

RemoveComponentsandOptionsfromOracleDatabases 52

Page 53: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

ComponentOverview

RemoveComponentsandOptionsfromOracleDatabases 53

Page 54: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

APEX - OracleApplicationExpress5.0.4� CDB

§ Removalscript(s):– $ cd $ORACLE_HOME/apex– $ PATH=$PATH:$ORACLE_HOME/perl/bin/perl– $ sqlplus / as sysdba– SQL> @?/apxremov.sql

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 54

Restart Recompilation Relink ErrorsNo No No Left overs:

PublicSynonymAPEX_SPATIALinallPDBs

TocleanupcreateaSQLscript:droppublicsynonymAPEX_SPATIAL;andexecuteitwithcatcon.pl

Page 55: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

OWM- OracleWorkspaceManager� CDB

§ Removalscript(s):$cd $ORACLE_HOME/rdbms/admin$$ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -C 'CDB$ROOT' -e -b owm_clean_pdbs -d '''.''' owmuinst.plb

$$ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -c 'CDB$ROOT' -e -b owm_clean_cdb -d '''.''' owmuinst.plb

$Details:

RemoveComponentsandOptionsfromOracleDatabases 55

Restart Recompilation Relink ErrorsNo No No IfcalledinonepassOWMdoes notgetremovedfromCDB$ROOT:

ERRORatline1:ORA-06598:insufficientINHERITPRIVILEGESprivilegeORA-06512:at"WMSYS.LT",line1ORA-06512:atline1ORA-06512:atline54ORA-06512:atline54ORA-06512:atline91

Page 56: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

OLS – OracleLabelSecurity- 1/2� CDB

§ Removalscript(s):– Seefollowingpageforexactsteps

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 56

Restart Recompilation Relink ErrorsNo No No Script catnools.sql ismissinginOracleDatabase12.2.0.1

Workaround:UsetheOracle12.1.0.2catnools.sql

Twoleftovers– workaroundrequiredLBAC_EXP;OLS_ENFORCEMENT;1.RemoveOLSfromallPDBsincludingthePDB$SEEDfirst2.RemoveOLSfromtheCDB$ROOTafterwards3.Removetheremainingpackagebodieswithascriptviacatcon.pl

Page 57: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

OLS – OracleLabelSecurity- 2/2� CDB§ Firstcopythemissingcatnools.sql intoyourcurrent?/rdbms/admin

$ cp $OH12.1/rdbms/admin/catnools.sql $ORACLE_HOME/rdbms/admin

$ cd $ORACLE_HOME/rdbms/admin

§ RemoveOLSfromallpluggabledatabasesincludingPDB$SEED$ $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -C 'CDB$ROOT' -e -b catnools_pdbs -d '''.''' catnools.sql

§ RemoveOLSfromtheCDB$ROOT$ $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -c 'CDB$ROOT' -e -b catnools_cdb -d '''.''' catnools.sql

§ Createascripttodroptheleftoversandexecuteitwithcatcon.pl$ vi drop_pb.sql

§ drop package LBAC_EXP;§ drop package OLS_ENFORCEMENT;

$ $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -e -b clean_ols -d '''.''' clean_ols.sql

RemoveComponentsandOptionsfromOracleDatabases 57

Page 58: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

SDO - SpatialDataOption– 1/3� CDB

§ Removalscript(s):– mddins.sql isn't very helpful

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 58

Restart Recompilation Relink ErrorsPDBs No No ShutdownofallPDBsrequiredbeforedroppingMDSYSinCDB$ROOT

Otherwise thedropwillfailwith:ORA-14452: attempt to create, alter or drop an index on temporary table already in use

Page 59: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

SDO - SpatialDataOption– 2/3� CDB§ CreateascriptdroppingMDSYSfromallPDBsfirst,thenfromtheCDB$ROOT

– vi drop_MDSYS.sql

§ drop user MDSYS cascade;

– $ORACLE_HOME/perl/bin/perl catcon.pl -C 'CDB$ROOT' -n 1 -e -b drop_MDSYS_pdb -d '''.''' drop_MDSYS.sql

– Dropallsynonymswheretable_owner='MDSYS'- createascriptdropsyn.sql–

– $ORACLE_HOME/perl/bin/perl catcon.pl -C 'CDB$ROOT' -n 1 -e -b dropsyn_pdb -d '''.''' dropsyn.sql

– $ORACLE_HOME/perl/bin/perl catcon.pl -c 'CDB$ROOT' -n 1 -e -b drop_MDSYS_cdb -d '''.''' drop_MDSYS.sql

– $ORACLE_HOME/perl/bin/perl catcon.pl -c CDB$ROOT' -n 1 -e -b dropsyn_cdb -d '''.''' dropsyn.sql

RemoveComponentsandOptionsfromOracleDatabases 59

set pagesize 0 set feed off spool dropsyn.sqlselect 'drop public synonym "' || synonym_name || '";' from dba_synonyms where table_owner='MDSYS'; spool off;

Page 60: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

SDO - SpatialDataOption– 3/3� CDB– vi drop_others.sql

§ drop user mddata cascade;

§ drop user spatial_csw_admin_usr cascade;

– $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -e -b drop_others -d '''.''' drop_others.sql

§ Createascriptdroppingfinalleftovers– vi drop_leftovers.sql

§ drop package sys.SDO_RDF_EXP_IMP;

– $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -e -b drop_leftovers -d '''.''' drop_leftovers.sql

RemoveComponentsandOptionsfromOracleDatabases 60

Page 61: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

CONTEXT - OracleText– 1/2� CDB§ Note:970473.1- Manualinstallation,deinstallationofOracleText11.2

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 61

Restart Recompilation Relink ErrorsNo No No FirstCONTEXTmustberemovedfromallPDBsincludingthe

PDB$SEED.Then amanualcleanupofleftoversmustbecompletedforallPDBsincludingthePDB$SEED.

Finally,CONTEXTcanberemovedfromtheCDB$ROOTandremainscanbecleanedupaswell

Seethefollowingpagefordetails.

Page 62: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

CONTEXT - OracleText– 2/2� CDB§ Removal– firstremoveCONTEXTfromallPDBs,thenaftercleanup,fromtheCDB$ROOT:

$ $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -C 'CDB$ROOT' -e -b catnoctx_pdbs -d $ORACLE_HOME/ctx/admin catnoctx.sql

$ vi cx.sql§ drop procedure sys.validate_context;§ drop package XDB.dbms_xdbt;§ drop procedure xdb.xdb_datastore_proc;

$ $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -C 'CDB$ROOT' -e -b cx_dropfrompdbs-d '''.''' cx.sql

$ $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -c 'CDB$ROOT' -e -b catnoctx_cdb -d $ORACLE_HOME/ctx/admin catnoctx.sql

$ $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -c 'CDB$ROOT' -e -b cx_dropfromcdb -d '''.''' cx.sql

$ vi cy.sql§ drop public synonym DBMS_XDBT

$ $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -e -b cy_drop -d '''.''' cy.sql

RemoveComponentsandOptionsfromOracleDatabases 62

Page 63: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

ORDIM - OracleMultimedia– 1/2� CDB

§ Removalscript(s):– SQL> @?/ord/im/admin/imremdo.sql

§ Thispassedbythechecksinimremov.sql butthechecksareinteractiveandthereforedon'tallowtobyusedwithcatcon.pl asthere'snointeractivity.Thereforeyoumayrunthechecksfromimremov.sql firstandtheninvokeimremdo.sql.Youmayusethescriptimremchk.sql tocheckusageofORDIMupfront.

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 63

Restart Recompilation Relink ErrorsNo Yes– 2x No Leftoversafterscriptcompletion andrecompilationneedtobe

cleanedupmanually:CON_ID OWNER OBJECT_TYPE OBJECT_NAME STATUS------ ------------ ------------ ------------------------------ --------

1 SYS PACKAGE BODY ORD_ADMIN INVALID1 SYS PACKAGE BODY ORDIMDPCALLOUTS INVALID2 SYS PACKAGE BODY ORD_ADMIN INVALID2 SYS PACKAGE BODY ORDIMDPCALLOUTS INVALID3 SYS PACKAGE BODY ORD_ADMIN INVALID3 SYS PACKAGE BODY ORDIMDPCALLOUTS INVALID4 SYS PACKAGE BODY ORD_ADMIN INVALID4 SYS PACKAGE BODY ORDIMDPCALLOUTS INVALID

Page 64: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

ORDIM - OracleMultimedia– 2/2� CDB§ Optional:CheckifORDIMisinuse:

– $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -e -b imremchk -d $ORACLE_HOME/ord/im/admin imremchk.sql

§ RemovefromPDBsfirst:– cd $ORACLE_HOME/rdbms/admin

– $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -c 'PDB$SEED TEST122C_PDB2 TEST122C_PDB1' -e -b imremdo_pdbs -d $ORACLE_HOME/ord/im/admin imremdo.sql

– $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -e -b utlrp -d '''.''' utlrp.sql

§ RemovefromCDB$ROOTafterwards:– $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -c 'CDB$ROOT' -e -b imremdo_cdb -d $ORACLE_HOME/ord/im/admin imremdo.sql

– $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -e -b utlrp -d '''.''' utlrp.sql

§ Manualcleanup:– vi dropim.sql

§ drop package SYS.ORD_ADMIN;

§ drop package ORDIMDPCALLOUTS;

– $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -e -b dropim -d '''.''' dropim.sql

RemoveComponentsandOptionsfromOracleDatabases 64

Page 65: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

XOQ- OLAPAPI– 1/2� CDB

§ Removalscript(s)– SQL> @?/olap/admin/olapidrp.plb

– SQL> @?/olap/admin/catnoxoq.sql

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 65

Restart Recompilation Relink ErrorsYes Yes No • Scriptshavethesameerrorssincereleases

• Manyobjectsleftinvalidrequiringrecompilationforcleanup• Many"error"dropsofobjectswhichdon'texist• RestartrequiredforeachPDBduetoopentransactionsafterremoval.

OtherwisetheattempttodropXOQfromthenextPDBwillresultin:

drop package dbms_cube_advise*ERROR at line 1:ORA-65023: active transaction exists in container PDB$SEED

Page 66: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

XOQ- OLAPAPI– 2/2� CDB§ RemoveXOQfromthePDBsfirst

– $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -c 'PDB$SEED TEST122C_PDB2 TEST122C_PDB1' -e -b olapidrp_pdbs -d $ORACLE_HOME/olap/admin/ olapidrp.plb

§ RedothisstepseparatelyforallPDBs– $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -c 'TEST122C_PDB2' -e -b catnoxoq_pdbs -d $ORACLE_HOME/olap/admin/ catnoxoq.sql

– SQL> alter pluggable database TEST122C_PDB2 close;

– SQL> alter pluggable database TEST122C_PDB2 open;

§ Recompile– $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -e -b utlrp -d '''.''' utlrp.sql

§ RemoveXOQfromCDB$ROOT– $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -c 'CDB$ROOT' -e -b olapidrp_cdb -d $ORACLE_HOME/olap/admin/ olapidrp.plb

– $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -c 'CDB$ROOT' -e -b catnoxoq_cdb -d $ORACLE_HOME/olap/admin/ catnoxoq.sql

– $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -e -b utlrp -d '''.''' utlrp.sql

RemoveComponentsandOptionsfromOracleDatabases 66

Page 67: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

APS- OLAPAnalyticalWorkspace- 1/2� CDB

§ Unlinkfirst– $> chopt disable olap

§ Removalscript(s)– $ORACLE_HOME/olap/admin/catnoaps.sql

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 67

Restart Recompilation Relink ErrorsYes Yes Yes • Manyobjectsleftinvalidrequiringrecompilationforcleanup

• Step-by-stepPDBremovalasotherwisescriptexecutionwillresultin:

*ERROR at line 1:ORA-65023: active transaction exists in container PDB$SEED

Page 68: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

APS- OLAPAnalyticalWorkspace- 2/2� CDB§ RemoveAPSfromthePDBsfirst

– $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -c 'TEST122C_PDB2' -e -b catnoaps_pdb2 -d $ORACLE_HOME/olap/admin/ catnoaps.sql

– $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -c 'TEST122C_PDB1' -e -b catnoaps_pdb1 -d $ORACLE_HOME/olap/admin/ catnoaps.sql

– $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -c 'PDB$SEED' -e -b catnoaps_pdbseed -d $ORACLE_HOME/olap/admin/ catnoaps.sql

§ Recompile– $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -e -b utlrp -d '''.''' utlrp.sql

§ RemoveAPSfromCDB$ROOT– $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -c 'CDB$ROOT' -e -b catnoaps_cdb -d $ORACLE_HOME/olap/admin/ catnoaps.sql

– $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -e -b utlrp -d '''.''' utlrp.sql

RemoveComponentsandOptionsfromOracleDatabases 68

Page 69: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

JAVAVM/XML- JavaVirtualMachineandXDK– 1/2� CDB

§ Standardremovalscript(s)– SQL> @?/rdbms/admin/catnojav.sql

– SQL> @?/xdk/admin/rmxml.sql

– SQL> @?/javavm/install/rmjvm.sql

§ Details:

RemoveComponentsandOptionsfromOracleDatabases 69

Restart Recompilation Relink ErrorsNo Yes No ComponententryremovalfromREGISTRY$ musthappencontainer

aftercontainertoavoidORA-65023

Page 70: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

JAVAVM/XML- JavaVirtualMachineandXDK� CDB

§ RemovalofJVMandXDKcomponents:– $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -b catnojav -d /u01/app/oracle/product/12.2.0.1/rdbms/admin

catnojav.sql

– $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -b rmxml -d /u01/app/oracle/product/12.2.0.1/xdk/admin rmxml.sql

– $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -b rmjvm -d /u01/app/oracle/product/12.2.0.1/javavm/install rmjvm.sql

– $ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -e -b utlrp -d '''.''' utlrp.sql

– vi reg.sql§ delete from registry$ where status='99' and cid in ('XML','JAVAVM','CATJAVA');

§ commit;

– $ORACLE_HOME/perl/bin/perl catcon.pl -c 'PDB2' -n 1 -b reg_pdb2 -d /u01/app/oracle/product/12.2.0.1/rdbms/admin reg.sql

– $ORACLE_HOME/perl/bin/perl catcon.pl -c 'PDB1' -n 1 -b reg_pdb1 -d /u01/app/oracle/product/12.2.0.1/rdbms/admin reg.sql

– $ORACLE_HOME/perl/bin/perl catcon.pl -c 'PDB$SEED' -n 1 -b reg_seed -d /u01/app/oracle/product/12.2.0.1/rdbms/admin reg.sql

– $ORACLE_HOME/perl/bin/perl catcon.pl -c 'CDB$ROOT' -n 1 -b reg_cdb -d /u01/app/oracle/product/12.2.0.1/rdbms/admin reg.sql

RemoveComponentsandOptionsfromOracleDatabases 70

Page 71: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

RemoveComponentsandOptionsfromOracleDatabases

PrefaceandScope

OracleDatabase11.2.0.4

OracleDatabase12.1.0.2

OracleDatabase12.2.0.1

Addendum- ScriptsandFurtherInformation

71

1

2

3

4

5

Remove ComponentsandOptions fromOracleDatabases |

Page 72: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

ComponentDependencyMatrixinOracleDatabase12c

RemoveComponentsandOptionsfromOracleDatabases 72

Page 73: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

ComponentUpgradeScripts– Oracle11.2.0.4

§ WorkspaceManager==>owmdbmig.sql

§ RulesManager==>ruldbmig.sql

§ ExpressionFilter==>exfdbmig.sql

§ DatabaseVault ==>dvdbmig.sql

§ JavaClasses ==>javdbmig.sql

§ JavaVM==>jvmdbmig.sql

§ DataMining==>odmdbmig.sql

§ LabelSecurity==>olsdbmig.sql

§ XDB==>xdbdbmig.sql

§ XS==>xsdbmig.sql

§ EM==>emdbmig.sql

§ XOQ==>xoqdbmig.sql

§ APEX ==>apxdbmig.sql

§ TEXT ==>ctxdbmig.sql

§ Spatial ==>sdodbmig.sql

§ AMDOLAPCatalog ==>amddbmig.sql

§ APSOLAPAnalytic Workspace ==>apsdbmig.sql

§ Ultrasearch ==>n/a

RemoveComponentsandOptionsfromOracleDatabases 73

Page 74: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

component_overview_nonCDB.sql

RemoveComponentsandOptionsfromOracleDatabases 74

set line 200set pages 1000col COMP_ID format a8col COMP_NAME format a34col SCHEMA format a12col STATUS format a10col VERSION format a12

select COMP_ID, comp_name, schema, status, version from DBA_REGISTRY order by 1;

Page 75: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

invalid_objects_nonCDB.sql

RemoveComponentsandOptionsfromOracleDatabases 75

set line 200set pages 1000col owner format a12col object_type format a12col object_name format a30col STATUS format a8

select owner, object_type, object_name, status from DBA_OBJECTS where status='INVALID' order by 1,2;

Page 76: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

component_overview_CDB.sql

RemoveComponentsandOptionsfromOracleDatabases 76

set line 200set pages 1000col COMP_ID format a8col COMP_NAME format a34col SCHEMA format a12col STATUS format a10col VERSION format a12col CON_ID format 99

select CON_ID, COMP_ID, comp_name, schema, status, version from CDB_REGISTRY order by 1,2;

Page 77: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

invalid_objects_CDB.sql

RemoveComponentsandOptionsfromOracleDatabases 77

set line 200set pages 1000col owner format a12col object_type format a12col object_name format a30col STATUS format a8col CON_ID format 9

select con_id, owner, object_type, object_name, status from CDB_OBJECTS where status='INVALID' order by 1,2,3;

Page 78: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017 Oracleand/oritsaffiliates.Allrightsreserved.|

BlogPosts§ https://mikedietrichde.com/2017/02/23/remove-components-from-the-oracle-kernel-with-chopt/

§ https://mikedietrichde.com/2015/05/27/removing-options-from-the-oracle-database-kernel-in-12c/

§ https://mikedietrichde.com/2015/12/02/what-or-who-is-jox-and-what-happens-if/

§ https://mikedietrichde.com/2015/06/22/java-in-the-database-ojvm-non-rolling-patches/

§ https://mikedietrichde.com/2015/11/19/why-you-should-remove-apex-from-the-cdbroot/

RemoveComponentsandOptionsfromOracleDatabases 78

Page 79: Remove Components and Options from Oracle Database 11.2.0 ...

Copyright©2017, Oracleand/oritsaffiliates.Allrightsreserved.| Remove ComponentsandOptions fromOracleDatabases 79

Page 80: Remove Components and Options from Oracle Database 11.2.0 ...