top of page

DB2 - ADMIN_DROP_SCHEMA to drop a schema

I use ADMIN_DROP_SCHEMA to drop a schema and its objects.

The main advantage of using the procedure , instead of writing a customized 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

db2 "CALL SYSPROC.ADMIN_DROP_SCHEMA ( schema_name, NULL, 'error_table_schema','error_table_name')"

Use this sql to view the errors:

db2 "SELECT * FROM error_table_schema.error_table_name"

Certain objects are not dropped using the ADMIN_DROP_SCHEMA procedure.

Commentaires


jc_logo.png

Hi, thanks for stopping by!

Welcome! to my “Muse & Learn” blog.

This website will help you to learn useful queries/SQL, Tips to troubleshoot problem and their remediation, perform DB related activities etc... and don't forget to muse with us :)....

It cover few useful information on below topics :

 

MySQL, SQL Server, DB2, Linux/UNIX/AIX, HTML ....

Let the posts
come to you.

Thanks for submitting!

  • Instagram
  • Facebook
  • Twitter
© 2023 By ImJhaChandan
bottom of page