Last active
March 6, 2022 19:27
-
-
Save dincosman/68ad1effeee8c86acffeecee86474af6 to your computer and use it in GitHub Desktop.
The query to detect and drop, not needed mdrt_ tables.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SQL> SELECT 'DROP TABLE ' || T.OWNER || '.' || '"' || T.TABLE_NAME || '" PURGE;' | |
| AS DROP_ORPHANED_MDRTS_COMMAND | |
| FROM DBA_TABLES T | |
| WHERE T.TABLE_NAME LIKE 'MDRT%' | |
| AND T.TABLE_NAME NOT IN (SELECT SM.SDO_INDEX_TABLE | |
| FROM ALL_SDO_INDEX_METADATA SM); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment