Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2007
    Posts
    49

    Unanswered: Error in Dropping the table.

    DB21034E The command was processed as an SQL statement because it was not a
    valid Command Line Processor command. During SQL processing it returned:
    SQL20241N Writing a history file entry for dropped table
    "{tablename}" failed. SQLSTATE=560C2

    I also face similar error related to history tables when I take Backup

    SQL2048N An error occurred while accessing object "db2rhist.asc". Reason
    code: "2".

    Can somebody suggest me how to resolve these errors.

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    You can disable drop table recovery on your table and issue the drop command to work around this error.

    But, make sure you look at the db2diag.log to check why the file is not accessible.
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Dec 2007
    Posts
    49
    Can you please let me know how to disable
    drop table recovery on tables ?? Will this solve my error related to backup as well ?

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by Neharao View Post
    Can you please let me know how to disable
    drop table recovery on tables ?? Will this solve my error related to backup as well ?
    Check the "alter tablespace" SQL statement in the manual.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  5. #5
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    Quote Originally Posted by Neharao View Post
    Will this solve my error related to backup as well ?
    Disabling drop table recovery won't resolve the error related to backup, backup operation needs to update the history file. As Sathyaram said, check the db2diag.log to understand why you're getting this error.

    What you may try to do is to rename your existing history files (db2rhist.asc and db2rhist.bak) located under the db directory of this db. DB2 will recreate them when it needs to write to the history file.

Posting Permissions

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