Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2003
    Posts
    30

    Unanswered: equivalent of truncate command of ORACLE

    What would be the equivalent of truncate table command of ORACLE in UDB.

    I need to clean up the tables without dropping it and without creating tons of log files.

    What are my options ?

    Also if I can pile on one more question : How do I put the user tablespace USER1 in an offline mode ? ( I would also appreciate if you can point me to any particular references for tablespace management)
    Thanx
    -Soumil

  2. #2
    Join Date
    Oct 2003
    Posts
    18

    Re: equivalent of truncate command of ORACLE

    You can try using this command,

    alter table .... activate not logged initiatlly with empty table..

    this will delete all rows maintaining all other definitions.

  3. #3
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1

    Re: equivalent of truncate command of ORACLE

    Originally posted by manga
    You can try using this command,

    alter table .... activate not logged initiatlly with empty table..

    ... only if the table has been created with "NOT LOGGED INITIALLY" option.

    You can effectively truncate a table by LOADing or IMPORTing an empty file into it (with REPLACE option).
    ---
    "It does not work" is not a valid problem statement.

  4. #4
    Join Date
    Oct 2003
    Posts
    8

    Arrow Re: equivalent of truncate command of ORACLE

    create one dummy file
    if it is unix

    touch test.txt

    replace table with dummy file, that ownt create log same as truncate table in Oracle

    db2 load from test.txt of del replace into <table name>

    --Raju

  5. #5
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: equivalent of truncate command of ORACLE

    For an empty file, you can use system's /dev/null ...

    there is a windows equivalent also, unfortunately, I do not remember

    Sathyaram

    Originally posted by db2os390udbdba
    create one dummy file
    if it is unix

    touch test.txt

    replace table with dummy file, that ownt create log same as truncate table in Oracle

    db2 load from test.txt of del replace into <table name>

    --Raju
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

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