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 > Sybase > How to investigate unexpected truncation of a Table.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-05-08, 03:32
stepsal stepsal is offline
Registered User
 
Join Date: Apr 2008
Posts: 4
How to investigate unexpected truncation of a Table.

Hi Guys,

I'm am very new to Databases & Sybase IQ so please bear with me

I'm testing an app (meta data editor tool) for a datawarehouse built on Sybase IQ. I have noticed that a pretty important table in the repositiory (DWHPartioning table) is being truncated after a certain set of actions in the application occur. These actions (basically just some inserts) should not affect this table in anyway but obviously something very strange is happening.
Luckily its not my job to fix this weird bug but still I would like to know if I can pinpoint what happened & when by reading the transaction logs?

Is it possible for me to read these logs and find out how or why the table was truncated?

If any one could shed some light on how they would go about investigating such an issue I would greatly appreciate it.

Thanks very much.
Steve
Reply With Quote
  #2 (permalink)  
Old 05-05-08, 08:04
stepsal stepsal is offline
Registered User
 
Join Date: Apr 2008
Posts: 4
Finally got an exception on that table when i tried to update something in the dwh rep. Which is a help.
11:23:21 [ERROR] Error (java.sql.SQLException) getting value for: 1/2 (java.lang.String: TABLENAME): java.sql.SQLException: [Sybase][ODBC Driver]Invalid cursor position

So it seems (my doing some rummaging around on google ) that the ResultSet.next() method was not called in the java application.. seems to be a common mistake. Time to give the developers a smack on the bum!
I love to know why something like this could truncate the whole table though.
Anyway, Ill keep talking to myself untill I figure it out, in the hope that it might help someone else in the future who comes across a similar problem .

Steve.

Last edited by stepsal; 05-05-08 at 08:08.
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