Home » Databases » FW Howto: List Invalid Views and fix the views in SAP Sybase IQ

FW Howto: List Invalid Views and fix the views in SAP Sybase IQ

From the fine folks at ARBIME:

select U.user_name + '.' + T.table_name 
from sysobject O, systab T, sysuser U 
where T.object_id = O.object_id 
  and U.user_id = T.creator  
  and O.status = 2 /* Invalid */   
  and O.object_type = 2 /* views */

http://arbime.wordpress.com/2013/02/11/list-invalid-views-in-sybase-iq/

You can usually fix the invalid views by simply recompiling:

alter view MY_VIEW recompile

and enabling:

alter view MY_VIEW enable

You should review the changes made to any referenced tables/views to ensure that the invalid view doesn’t need to be rewritten.

Share Button

Comments

  1. At this time, we don’t have a way of determining invalid stored procedures in IQ.

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*

Facebook login by WP-FB-AutoConnect