ADMIN_DROP_SCHEMA to drop a schema
Posted by: DBA DB2,
on 02 Aug 2011 |
View original | Bookmarked: 0 time(s)
I use ADMIN_DROP_SCHEMA to drop a schema and its objects. The main advantage of using the procedure , instead of writing a customised script is there could be routines such as stored procedures or UDFs with cross dependencies and require to be dropped in a certain order.
An example is
CALL SYSPROC. ADMIN_DROP_SCHEMA ( schema_name, NULL, 'error_table_schema','error_table_name')
---Use this sql to view the errors:
SELECT * FROM error_table_schema.error_table_name
Certain objects...