How do Views get corrupted?

Bharath Kumar shared this question 8 months ago
Answered

Hello,

We have often see that all the tables in the views are getting deleted somehow and due to this reports are not working. We are not sure how this corruption is happening, are there any possibilities for this or to avoid this issues in future?

I have checked on the reportview table in DB, searched with the viewname and I see only one entry with status Open which means the view is active. However, from the application side, the view does not open or edit, it throws the error "oh no an error has occurred".

We did a DB restore, but that did not help too. Finally, we had to migrate the corrupted views from working system.

May I know why it happens and how to avoid this happening in future again?

- Bharath

Comments (8)

photo
1

Hi Bharath,

unfortunately at this stage of the investigation I don't have enough information to draw any conclusions about what caused the view corruption.

Could you please send across all log files from the folder <SMARTREPORTING>/appserver/logs, and also give an indication of when you first noticed that a Yellowfin view had got corrupted so I can investigate the previous 12 hours of log entries leading up to that point in time.

thanks,

David

photo
1

Hi Dave,

Attached the logs. Not sure what exactly happened, but tables got deleted from some of the views. So we restored the configuration database, but we saw another problem with restore. We started facing license breached error, not sure how DB restore leads to licensing error. You can find the same in smart reporting.log file attached here.

Finally, we had to manually import the views from working env.


-Bharath

photo
1

Hi Bharath,

thanks for the logs, I have studied them and I could see in catalina.out at 4:03 the first of many errors such as the following:

BMC:SR:2018-10-26 04:03:55: WARN (MIViewProcess:loadViewFields) - WARNING: Report Field: [ColumnName = eti_ReassignedTo, RefRltshpTypeCode = null, FieldTemplateId = 147458] has been detected as missing from the view, flagging as DISCONNECTED.

This means that Yellowfin went to load the view fields from the view but couldn't find them, so it then changed their status to DISCONNECTED.

This would cause the columns to come up red in the view builder, or whole tables to come up red.

So that is why the view is "corrupted", however, as to why Yellowfin couldn't find the fields, not exactly sure but if we look through the errors leading up to the DISCONNECTED errors we see the following:

at 2:11 there is some sort of connection issue between the ARSYS driver and the source:

BMC:SR:2018-10-26 02:11:28:ERROR (DBAction:A) - Error occurred when connecting to the database: java.sql.SQLException: Cannot load connection class because of underlying exception: 
'java.sql.SQLException: ERROR (91): RPC call failed; remsrvprod:30005 can not receive ONC/RPC data'.
java.sql.SQLException: Cannot load connection class because of underlying exception: 
'java.sql.SQLException: ERROR (91): RPC call failed; remsrvprod:30005 can not receive ONC/RPC data'.
	at com.bmc.arsys.jdbc.core.Driver.connect(Driver.java:217)
	at com.hof.pool.JDBCConnection.openConnection(JDBCConnection.java:179)
then there is a string of error from 3:07 in which the ARSYS driver is trying to retrieve a form but has sent a blank required field:

BMC:SR:2018-10-26 03:07:00: INFO (MIPreDashboardAction:execute) - MIPreDashboardAction entered
java.sql.SQLException: ERROR (102): Required name parameter (or name field in a parameter) is empty.
	at com.bmc.arsys.jdbc.framework.ARAPIClient.getForm(ARAPIClient.java:427)
	at com.bmc.arsys.jdbc.core.DatabaseMetaData.getTables(DatabaseMetaData.java:800)
	at com.bmc.arsys.jdbc.core.DatabaseMetaData.getTables(DatabaseMetaData.java:32)
so to me it looks like that initial technical hitch at around 2:11 may have eventually led to the view becoming corrupted.

An important thing to tell you is that next time you get the view fields being set to the status of DISCONNECTED, it is definitely well worth trying a quick fix by changing their status back to OPEN with the following update query:

UPDATE ReportFieldTemplate 
SET StatusCode = 'OPEN'
WHERE 
(
   ViewId = '<insert ViewId here>' 
   OR ViewId IN 
   (
      SELECT ViewId 
      FROM ReportView 
      WHERE ParentViewId = '<insert ViewId here>'
    ) 
) 
AND StatusCode = 'DISCONNECTED'

and then you'll have to restart SmartReporting.

Hope that's of some help to you!

regards,

David

photo
1

Hi Bharath,

just checking up on how you got on with this matter, and whether you'd like this ticket closed or not?

regards,

David

photo
1

Hi Dave,

We are still having issues with Views corruption.

-Bharath

photo
1

Hi Bharath,

last time I mentioned that from the logs it seemd like initially there was some sort of connection issue between the AR SYS driver and the data source which eventually led to the fields not being retrieved from the data source.

So it would be very interesting if you could send across all of the latest logs and I'll study them to see if the same sequence of errors occurred or not this time.

regards,

David

photo
1

Hi Bharath,

I know we're treading very old ground here, but Big Dave is no longer with Yellowfin, so I'm just going through his older cases and just wanted to check in make sure whether everything's okay with this. Although it's of course too late to get logs that correspond with this time frame, if the issue persists I'd be happy to review this further with you.


Thanks,

Mike

photo
1

Hi Bharath,

I'm going to go ahead and mark this one as Answered since we haven't heard back from you and this is a very old case besides, but if you have further questions or concerns on this, if you respond, it will re-open the case and put it back in my queue and I'll be happy to help.

Regards,

Mike