DB2 - ADMIN_DROP_SCHEMA to drop a schema

02 August,2011 by Jack Vamvas

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 are not dropped using the ADMIN_DROP_SCHEMA  procedure.

 

Check the DB2 documentation for details

 

Author: Jack Vamvas(http://www.dba-db2.com)

Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on DB2 - ADMIN_DROP_SCHEMA to drop a schema

Comments are moderated, and will not appear until the author has approved them.


dba-db2.com | DB2 Performance Tuning | DBA DB2:Everything | FAQ | Contact | Copyright