Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2013
    Posts
    19

    Unanswered: Db2 drop schema contents

    Hi all, is there any query in db2 9.7 control center wherein i cant DELETE(DROP) all the contents of my schema (including the schema) at once.

    Other option is to drop/delete the objects first and then DROP schema..
    But i want to DROP THE ENTIRE SCHEMA WITH ALL OBJECTS at once.

    "DROP SCHEMA <schema_name> CASCADE/RESTRICT" didnt work for me.


    Please help me out guys !

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    as indicated in doc :
    drop schema : all objects must be dropped before...
    maybe admin_drop_schema can help.. see doc for details....
    ADMIN_DROP_SCHEMA - IBM DB2 9.7 for Linux, UNIX, and Windows
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Mar 2013
    Posts
    19
    Thanks buddy !

    Will work on it today ...
    and post the result ..........

  4. #4
    Join Date
    Mar 2013
    Posts
    19

    Cool

    Thanks przytula_guy
    your initiative helped me.

    "call admin_drop_schema ('SAGAR1', NULL, 'ERRORSCHEMA', 'SCHEMADROPERR')"
    worked for me ..

    but it will indirectly create a schema named "Errorschema" in ur db..
    so , perform
    "DROP SCHEMA ERRORSCHEMA RESTRICT" later !!
    CHEERS

  5. #5
    Join Date
    Mar 2013
    Posts
    19
    how i mark this thread as solved ?

    i am new to this forum ?

  6. #6
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    thanks for providing feedback and additional info. Very much appreciated.

    No need to mark as solved.
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •