If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Error in Dropping the table.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-18-10, 13:40
Neharao Neharao is offline
Registered User
 
Join Date: Dec 2007
Posts: 49
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.
Reply With Quote
  #2 (permalink)  
Old 03-18-10, 14:26
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,533
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.
Reply With Quote
  #3 (permalink)  
Old 03-18-10, 23:02
Neharao Neharao is offline
Registered User
 
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 ?
Reply With Quote
  #4 (permalink)  
Old 03-18-10, 23:14
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,195
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
Reply With Quote
  #5 (permalink)  
Old 03-19-10, 01:02
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,810
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On