SQL/MP Installation and Management Guide
Performing Recovery Operations
HP NonStop SQL/MP Installation and Management Guide—523353-004
11-6
Restoring Views
Restoring Views
Protection views cannot be explicitly restored; they are restored with the underlying 
table only. Shorthand views, however, can be only explicitly restored.
When a table is restored, only those shorthand views explicitly identified by the file set 
list are automatically restored. If you use a wild-card character in a file set list and a 
shorthand view name satisfies the file set list, the shorthand view is considered to be 
explicitly identified.
Restoring a shorthand view restores any comments associated with the view. A 
shorthand view can be restored, but the view might subsequently be marked invalid. 
After restoring the complete file set list, RESTORE tries to validate the view. A 
shorthand view might have several underlying tables or views; RESTORE might not be 
able to validate the view if the underlying objects are not available. You should always 
check the status of the views after RESTORE completes. If a view is invalid, you must 
drop and re-create the view.
Views contain no physical data; therefore, you might want to re-create the view instead 
of performing a RESTORE of the definition.
Restoring Indexes
You should normally restore indexes automatically with the underlying table. You can 
prohibit the restoration of indexes by specifying INDEXES EXPLICIT in the RESTORE 
command so that only those indexes identified by the file set list are explicitly restored.
To restore the primary partition of an index, restore the entire index. 
Restoring Programs
Restored SQL programs are not automatically registered in an SQL catalog; the SQL 
sensitive flag is set off, and the programs cannot be run without first being compiled.
The RESTORE operation allows SQL programs stored in Guardian files to be explicitly 
SQL compiled during the restore operation. If you include the SQLCOMPILE ON 
option, RESTORE directs the SQL compiler to recompile the program with the 
DEFINEs stored in the program during the last explicit compilation.
You can use the SQLCOMPILE ON option effectively when restoring programs 
individually or for restoring programs when you know that the referenced SQL tables 
and views already exist on the system. If the referenced tables and views are not 
available when the program is restored, the recompile cannot produce a valid query 
execution plan. You should not use the SQLCOMPILE ON option if you are using 
RESTORE to move the database.
Caution. You must be extremely careful when using the INDEXES EXPLICIT option because 
it can cause tables to become inconsistent. A list of possible inconsistencies appears earlier 
under Restoring Tables
.










