Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2004
    Posts
    7

    Unanswered: Delete the content on the database?

    Hi @ll,

    i want to delete the whole content of the database but not the structure.
    How is this possible?

    Thx @ll,

    DBNOOB

  2. #2
    Join Date
    Mar 2004
    Location
    Toronto, ON, Canada
    Posts
    513
    Quote Originally Posted by DBNOOB
    Hi @ll,

    i want to delete the whole content of the database but not the structure.
    How is this possible?

    Thx @ll,

    DBNOOB
    Have to do it table by table, but that should be easy enough from a script.

    An old trick - use LOAD with the REPLACE option from an empty file for each table, that avoids the logging of a DELETE.
    --
    Jonathan Petruk
    DB2 Database Consultant

  3. #3
    Join Date
    Mar 2004
    Location
    Toronto, ON, Canada
    Posts
    513
    Quote Originally Posted by J Petruk
    Have to do it table by table, but that should be easy enough from a script.

    An old trick - use LOAD with the REPLACE option from an empty file for each table, that avoids the logging of a DELETE.
    Or you can use db2look with "-e -a" options to extract the structure as db2 statements, then create the database from scratch...
    --
    Jonathan Petruk
    DB2 Database Consultant

Posting Permissions

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