How To Remove Oracle Spatial In 11.2 Manually

Execute the following comands;

 connect / as sysdba 

spool remove.log

-- Check if any Spatial Indexes --------
SELECT OWNER,INDEX_NAME FROM DBA_INDEXES WHERE ITYP_NAME = 'SPATIAL_INDEX';

-- Check if any Spatial Columns --------
SELECT OWNER, TABLE_NAME, COLUMN_NAME 
FROM DBA_TAB_COLUMNS 
WHERE DATA_TYPE = 'SDO_GEOMETRY' 
AND OWNER != 'MDSYS' 
ORDER BY 1,2,3;

-- If some Spatial index drop ------
DROP INDEX <OWNER>.<INDEXNAME> FORCE; 


-- Drop the user MDSYS ------
DROP USER MDSYS CASCADE;  


-- Drop users link to Spatial cataloge ------
DROP USER MDDATA CASCADE;
DROP USER SPATIAL_CSW_ADMIN_USR CASCADE;
USER SPATIAL_WFS_ADMIN_USR CASCADE;

spool off
exit

HTH – Antonio NAVARRO

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s