How To Deinstalll Oracle Spatial Keeping Oracle Locator (Doc ID 1070647.1)
In this Document
Goal
Solution
References
7X oe cel
Oracle Spatial and Graph - Version 10.1.0.5 to 12.1.0.1 [Release 10.1 to 12.1]
Information in this document applies to any platform.
**Checked for relevance on 03-Sep-2012***
GOAL
Deinstall Oracle Spatial Keeping Oracle Locator from 10gR1 to 11gR2
SOLUTION
*** Deinstallation of Oracle Spatial and Installation of Oracle Locator in 10gR1 ***
In 10gR1 it is not possible to switch from Oracle Spatial to Oracle Locator without completely deinstalling Oracle Spatial. The
only valid way is to de-install Spatial and install Locator.
1, De-install Oracle Spatial completely following Note:179472,1 Make sure you backup your spatial data as this will invalidate
the SDO_GEOMETRY columns, see note for details.
2. Install Oracle Locator assuming Oracle Intermedia is already installed:
connect / as syadba
create user MDSYS identified by
default tablespace SYSAUX account lock;
spool mdprivs.log
start 2/md/adnin/ndprivs.sqi
alter session set carrent_schena="MDsYs";
spool off
spool imindlos.1og
start ?/ord/in/adnin/imindloc.sq1
*** Deinstallation of Oracle Spatial keeping Oracle Locator in 10gR2 and 11gR2 ***
Using this code your spatial data is intact, tables with SDO_GEOMETRY columns will nt be affected,
Build a script with the following code and call it sdo_deinst.sql
Note: Ignorable errors may be encountered: ORA-29809: cannot drop an operator with dependent objects
— start of sdo_deinst.sqi -
conn / as aysdba
spool sdo_deinst.1og
set echo on
col comp_name format 225
col version format a23
col status format al5
select comp_name, version, status
from eba_registry
where cofp_name="spatial';declare
stmt varchar? (1000) ;
obj_name varchar? (64);
type cursor_type is REF CURSOR;
query_crs cursor type 7
begin
stmt i= ' select SNAME from sys.eynonyms ' ||
"where creator="'MDSYS'' and SYNTYPE="*PUBLIC'' ‘||
+ and TABTYPE<> "JAVA CLASS*' ';
OPEN query_crs FOR stmt:
1002
fetch query_crs into obj_nane,
EXIT when query_crs$NOTFOUND
begin
EXECUTE smnediate
EXCEPTION
WHEN OTHERS THEN
obj_name i= ' 17
end
END Loop;
close query_ersi
end
/
drop public synonym "| |ob}_namey
‘TRIGGER
declare
stmt varchar? (1000) ;
obj_name varchar2 (64) ;
type cursor_type is REF CURSOR;
query_crs cuzsor_type 7
begin
stm: i= ' select object_nane from all_objects where ' ||
"object_type = ''TRIGGER'! and onner = '*MpsYS'* '7
OPEN query_crs FOR stmt
Loo?
fetch query_crs into obj_nane;
EXIT when Guery_crsiNOTFGUND ;
begin
EXECUTE innediate ' drop TRIGGER mdsys.*||obj_name;
EXCEPTION
WHEN OTHERS THEN
obj_name t= 117
end
END LooPs
close query ers;
AVA CLASS
stm: i= * select object_nane from all_objects where ' ||
Y object_type = ''JAVA CLASS"! and owner = ''MDSYS'' *
OPEN query_crs FOR stmt;
Loo?
fetch query_crs into obj_nane;
EXIT when query_crstNOTFOUND ;
begin
EXECUTE innediate ' drop JAVA CLASS mdsys.""| |obj_name||*" "
EXCEPTION
WHEN OTHERS THEN
obj_name t= 117end
END L00P;
close query_crs;
PACKAGE
stm: i= ' select object_name from all_objects where ‘ ||
* object_type = '"PACKAGE BODY"? and Gener = "*MDSyS'" ';
OPEN query_crs FOR stmt:
1002
fetch query_crs into obj_nane,
EXIT when query_crs$NOTFOUND
begin
EXECUTE immediate ‘ drop PACKAGE BODY mdays.'||/obj_name
EXCEPTION
WHEN OTHERS THEN
obj_name i= ' 17
end
END Loop;
close query_ersi
commit?
PROCEDURE
stm: i= ' select object_nane from all_objects where ' ||
* object_type = '"PROCEDURE'* and owner = ''MDSYS'' ";
OPEN query_crs FOR stmt;
1002
fetch query_crs into obj_name;
EXIT when query crstNOTFOUND ;
begin
EXECUTE immediate ' drop PROCEDURE adsys."| |obj_nane:
EXCEPTION
WHEN OTHERS THEN
obj_name := ' 'y
end
END Loop;
close query ers;
SEQUENCE
stmt i= ' select object_nane from all objects where ' ||
* object_type = ''SEQUENCE'' and owner = "'MDSYS'' *;
OPEN query_crs FOR stmt;
1002
fetch query crs into obj_name;
EXIT when query_crstNOTFOUND ;
begin
EXECUTE immediate ' drop SEQUENCE mdays.*| |obj_names
EXCEPTION
WHEN OTHERS THEN
obj_name i= 1 1;
end
END Loop;
close query_ers;
commit:
SYNONYMS
stmt i= ' select SNAME from sys.eynonyms ' ||
"where creator="'MDSYS'' and SYNTYPE="*PUBLIC'' ';
OPEN query_crs FOR stmtyLo0F
BEGIN:
fetch query_crs into obj_nane;
EXIT when query_crsiNOTFOUND ;
begin
EXECUTE imnediate ' drop public synonym ‘| |obj_nane;
EXCEPTION
WHEN OTHERS THEN
obj_name := 11;
end
ends
END LOOP;
close query_ers;
ends
/
drop type body MDSYS.820_T0PO GEOMETRY;
Arop package MDSYS.3D0_ TOR
arop package MDSYS.SD0_TOPO_MAP;
drop package MDSYS.SD0_GEOR;
drop package MDSYS.SDO_GEOR_INT
drop package MDSYS.SD0_GEOx_D2F;
drop package MDSYS.SD0_GEOR_AUX;
drop package MDSYS.SD0_GHORX;
arop package MDSYS.300 GEOR ADMIN;
drop package MDSYS.SD0_GEOR VTL;
drop package MDSYS.SD0_GCDR;
drop package MDSYS.SDO_NET;
drop package MDSYS.MD_NET;
drop type body MDSYS.5D0_ NETWORK MANAGER Ty
arop type body MDSYS.530_NODE. 1
drop type body MDSYS.SD0_LINK 17
arop type body MDSYS.SD0_PATH_T;
drop type body MDSYS.SD0_NETWORK_1
drop type body MDSYS.SANCLUST_IMB_T;
drop package MDSYS.SD0_N#T_MEN;
drop package MDSYS.S00_SAM?
drop function MDSYS. SPCLUSTERS:
drop package MDSYS.PRVT_SAM;
drop package MDSYS.SD0_ HFS PROCESS;
drop package MDSYS.S00_CSi_PROCESS;
drop package MDSYS.SD0_C_PKG;
Arop package MDSYS.pRVE_PC;
arop package MDSYS.SD0_TIN_PKG:
drop package MDSYS.PRVT_TIN;
col comp_name format 225
col version format a23
col status format als
select comp_name, version, status
from dba_registry
where comp_nam
Spatial’;
spatial still VALID?
Reload Locator:
alter seesion set current_schena-MDs¥s:
start 2/md/adnin/eatmdloc.sqi
col comp_name format 225
col version format 323col status format als
select comp_nane, version, status
from dba_registry
where conp_nane="spatial';
-- bist invalids
select owner, objec
com dba_obi
where stacus=" INVALID’
and owner='NDSYS";
__nane, object_type
== Mark 800 as Removed
EXECUTE dhns_registry.zemoved ("S00");
alter session set carrent_schema=SYS;
set echo off
spool off
~ End of ado_deinst.eal ~
Execute the script connected as / as sysdba
sqiplus /nolog
conn / as aysdba
start sdo_deinst.sql
If Oracle Spatial is required and you have met the licensing requirements for using Oracle Spatial you can re-install Oracle
Spatial with the following:
sqiplus /nolog
conn / as sysdba
spool spatial_installation-1st
start 2/md/adain/ndinst.sql
spool off
‘The Spatial component should show status VALID:
col comp_name format a25
col version format a25
col status format als
select comp_nams, version, status
eerie ceed
where cofp_name~'spatial';
COMP_NAME VERSION STATUS
jal 11,1.0.7.0 VALID
**% Deinstallation of Oracle Spatial keeping Oracle Locator in 11.2 and 12.1 ***
In 11.2 and 12.1 If you have a database where the Oracle Spatial objects have been installed and you see Spatial in the
DBA_REGISTRY you can follow these steps to remove Spatial but keep Locator features:
sqiplus /nolog
conn / as aysdba
001 mdding. 10g
art ?/nd/adnin/mddins.sal
spool off
Recompile invalid objects if necessary‘The Spatial component will show status REMOVED:
col comp_name format 925
select comp_nane, version, statue
com dba_registry
where conp_nane="Spatial';
output:
COMP_NAME VERSTON STATUS
Spatial 11.2.0.1.0 REMOVED
MDSYS user will continue to exist in the database:
fernane from dba_users
YS"
where usernan¢
output:
USERNAME
sosys
Oracle Multimedia has to be with a status of VALID:
col comp_name format a25
col version format a25
col status format als
select comp_name, version, status
from dba registry
where upper (comp_nai
) Like MEDIAS;
Output:
COMP_NAME VERSION STATUS
ora
Le Multimedia 11.2.0.1.0 VALID
If you already have an Oracle Locator installation but Oracle Spatial is required and you have met the licensing requirements
for using Oracle Spatial you can do the following to install it:
sqiplus /nolog
conn ays as sysdba
spool mdinst.log
start 2/md/adnin/ndinst sql
spool off
‘The Spatial component will show status VALID:
col comp_name format a25
col version format a25
col status format als
select comp_name, version, status
from dba registry
where coip_nane-'spatial':
output:
COMP_NAME VERSION STATUSSpatial 11.2.0.1.0 VALID
REFERENCES
NNOTE:179472.1 - Steps for Manual Devinstallation of Oracle Spatial
NOTE: 1066837.1 - Oracle Spatial and Oracle Locator Licensing Information
NOTE:357943.1 - How To Verify That Oracle Locator Is Installed
Didn't find what you ae laking for?
Document Attributes
‘Author: JBARBA.US;KGRAAF.NL; PUBLISHED(EXTERNAL)
Owner: MABHIRAM IN KGRAA.NL
Alas: TEXTX-HTML,
Distribution: EXTERNAL EXTERNAL
Created By: JBARBA.US Mar 4, 2010
Modified BY: MIBROWN US Feb 8, 2017
Reviewed By: KGRAAF.NL Apr 22, 2011
‘Source: AWIZ NO
Pronity: 3