Search notes:

Drop Oracle objects

The following SQL statement returns a set of drop … statements. I use this script sometimes to quickly drop a list of «temporary» objects that have accumulated during the development of a feature or in a testing phase.
select
  'drop ' || obj.object_type || ' ' || obj.object_name || ';' stmt
-- obj.created
from
   all_objects           obj     left join
   all_tab_identity_cols idc on obj.object_type = 'SEQUENCE'        and
                                obj.object_name = idc.sequence_name and
                                obj.owner       = idc.owner
where
-- object_name not like 'X'               and
-- object_name     like 'Y'               and
   obj.object_type not in ('INDEX', 'PACKAGE BODY', 'TYPE BODY', 'LOB') and
   idc.sequence_name is  null                                           and -- exclude sequences of identity columns
   obj.owner = user
order by
   obj.created desc
--  object_name
;
Github repository oracle-patterns, path: /DatabaseObjects/scripts/drop.sql

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759567402, '216.73.216.149', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/objects/scripts/index(50): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78