Tuesday, November 19, 2024

.::: Drop table default MB_, MD_, MIGR_ in Oracle Database & cleansing RECYCLEBIN :::.

 


1. Check table
SELECT *
FROM user_tables
WHERE table_name LIKE 'MB_%' OR table_name LIKE 'MIGR_%' OR table_name LIKE 'MD_%';

 


2. create script drop table by filter MB_ &  MIGR
_
SELECT 'DROP TABLE ' || table_name || ' CASCADE CONSTRAINTS;' AS drop_command
FROM user_tables
WHERE table_name LIKE 'MB_%' OR table_name LIKE 'MIGR_%';


3. create script drop table by filter MD_ &  MIGR_

SELECT 'DROP TABLE ' || table_name || ' CASCADE CONSTRAINTS;' AS drop_command
FROM user_tables
WHERE table_name LIKE 'MD_%' OR table_name LIKE 'MIGR_%';

 


4. running script drop table

5. check table
 


6. purge table

SHOW RECYCLEBIN;
PURGE RECYCLEBIN;
SHOW RECYCLEBIN;
 

7. check table after purge


 

No comments:

Post a Comment

Popular Posts